:root {
  --bg:       #0d1117;
  --surface:  #161b22;
  --border:   #21262d;
  --text:     #e2e2ea;
  --muted:    #6b7590;
  --accent:   #f5a623;
  --accent-h: #ffb740;
  --radius:   6px;
  --max:      960px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }

/* ─── HEADER ─────────────────────────────────────── */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.90);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  display: block;
  height: 36px;
  width: auto;
  transition: opacity .2s;
}
.brand:hover .logo-img { opacity: .85; }

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav a {
  color: var(--muted);
  font-size: .875rem;
  letter-spacing: 0.02em;
  transition: color .2s;
}
nav a:hover { color: var(--text); }

.lang-switcher {
  display: flex;
  gap: .5rem;
  margin-left: 1rem;
}

.lang-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .75rem;
  font-family: inherit;
  letter-spacing: 0.05em;
  padding: .2rem .55rem;
  cursor: pointer;
  transition: all .2s;
}
.lang-btn:hover, .lang-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── HERO ────────────────────────────────────────── */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  text-align: center;
}

.hdot { color: var(--muted); font-size: 1em; line-height: 0; vertical-align: middle; margin: 0 .2em; }
.hw1 { color: var(--muted); }
.hw2 { color: var(--muted); }
.hw3 { color: var(--muted); }

.hero-logo {
  margin-bottom: 1.75rem;
  height: 260px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 65% 85% at 50% 50%,
    rgba(245, 166, 35, 0.08) 0%,
    rgba(14, 165, 233, 0.04) 50%,
    transparent 75%);
}

.hero-logo-canvas {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-logo-img {
  display: block;
  height: calc(0.9rem * 1.7 + 2 * 0.65rem + 2px);
  width: auto;
}

@media (max-width: 480px) {
  .hero-logo { height: 200px; }
}

.hero-electronics {
  display: flex;
  justify-content: center;
  margin-top: -.25rem;
  margin-bottom: 2rem;
}

.electronics-svg {
  display: block;
  height: 28px;
  width: auto;
}

.hero-eyebrow {
  font-family: 'Courier New', monospace;
  font-size: .8rem;
  letter-spacing: .15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.hero h1 {
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: .04em;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.btn {
  display: inline-block;
  padding: .65rem 1.5rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background: var(--accent-h);
  border-color: var(--accent-h);
  color: var(--bg);
}

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

.hero-cta {
  text-align: center;
  margin-top: .5rem;
}

/* ─── SECTION COMMON ──────────────────────────────── */

section {
  border-top: 1px solid var(--border);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-label {
  font-family: 'Courier New', monospace;
  font-size: .75rem;
  letter-spacing: .15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -.015em;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.section-lead {
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* ─── SERVICES ────────────────────────────────────── */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  cursor: pointer;
  transition: border-color .25s, transform .25s, box-shadow .25s, background .25s;
}
.service-card:hover:not(.active) {
  border-color: rgba(245, 166, 35, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.08);
}
.service-card.active {
  border-color: var(--accent);
  background: rgba(245, 166, 35, 0.03);
}
.service-card.active .service-icon {
  color: var(--accent);
}

.service-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  opacity: .85;
  transition: opacity .3s, color .3s;
}
.service-icon svg {
  width: 2rem;
  height: 2rem;
  display: block;
  transition: stroke .3s;
}
.service-card:hover .service-icon {
  opacity: 1;
  color: var(--accent);
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .75rem;
  letter-spacing: -.01em;
}

.service-card p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.75;
}

.focus-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.focus-label {
  font-family: 'Courier New', monospace;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.focus-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.focus-chip {
  font-size: .8rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(245, 166, 35, 0.07);
  border: 1px solid rgba(245, 166, 35, 0.22);
  border-radius: 2rem;
  padding: .28rem .85rem;
  letter-spacing: .01em;
}

.service-topics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.service-topics li {
  font-size: .9rem;
  color: var(--muted);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.5;
}
.service-topics li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1.3;
}

/* ─── SERVICE DETAIL PANEL (card-as-tab) ─────────────── */

.card-toggle-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s;
}
.card-toggle-label {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.card-cta {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  font-size: .8rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .4rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s, color .2s;
}
.card-cta:hover {
  border-color: var(--muted);
  color: var(--text);
}
.svc-item { display: flex; flex-direction: column; }
.svc-item .card-cta { margin-top: .9rem; align-self: flex-end; }
.service-card:hover .card-toggle-hint,
.service-card.active .card-toggle-hint { color: var(--accent); }
.card-chevron { transition: transform .3s ease; }
.service-card.active .card-chevron { transform: rotate(180deg); }

.svc-panel { display: none; grid-column: 1 / -1; }
.svc-panel.active {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  grid-column: 1 / -1;
  border-top: 2px solid var(--accent);
  padding-top: 1.5rem;
  animation: svcFadeUp .22s ease;
}
@keyframes svcFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.svc-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.svc-item-icon { color: var(--accent); margin-bottom: .6rem; }
.svc-item-icon svg { width: 1.1rem; height: 1.1rem; display: block; }
.svc-item h5 { font-size: .875rem; font-weight: 600; margin-bottom: .35rem; letter-spacing: -.01em; }
.svc-item p  { font-size: .82rem; color: var(--muted); line-height: 1.65; }

@media (max-width: 600px) {
  .svc-panel.active { grid-template-columns: 1fr; }
}

/* ─── CONSULTING DETAIL ──────────────────────────────── */

#consulting-detail,
#engineering-detail,
#testing-detail {
  border-top: 1px solid var(--border);
}
#consulting-detail .section-inner {
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.consult-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.consult-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color .3s, box-shadow .3s;
}
.consult-item:hover {
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.08);
}

.consult-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent);
  margin-bottom: .9rem;
}
.consult-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.consult-item h4 {
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: .6rem;
}

.consult-item p {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.75;
}

@media (max-width: 600px) {
  .consult-grid { grid-template-columns: 1fr; }
}

/* ─── APPROACH ───────────────────────────────────────── */

.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 4rem;
}

.step-num {
  display: block;
  font-family: 'Courier New', monospace;
  font-size: .72rem;
  letter-spacing: .15em;
  color: var(--accent);
  margin-bottom: .6rem;
}

.pdca-letter {
  font-size: 2rem;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: .75rem;
  opacity: .9;
}

.step-title {
  font-size: .975rem;
  font-weight: 600;
  margin-bottom: .4rem;
  letter-spacing: -.01em;
}

.step-desc {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.75;
}

@media (max-width: 600px) {
  .steps-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ─── PRODUCT ─────────────────────────────────────── */

.product-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.product-badge {
  display: inline-block;
  font-family: 'Courier New', monospace;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: .15rem .55rem;
  margin-bottom: 1.25rem;
}

.product-feature h3 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.product-feature .desc {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.8;
  margin-bottom: 1.75rem;
}

.spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 2rem;
}

.spec-list li {
  font-size: .875rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .6rem;
}

.spec-list li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.product-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: var(--muted);
}

.product-visual-label {
  font-family: 'Courier New', monospace;
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.product-visual-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}

/* Schematic-style decorative SVG placeholder */
.product-visual svg {
  width: 120px;
  height: 80px;
  opacity: .3;
}

/* ─── REFERENCES ──────────────────────────────────── */

.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.ref-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color .25s;
}
.ref-card:hover { border-color: var(--border); }

a.ref-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.ref-card:hover { border-color: var(--accent); }

.ref-card-visual {
  margin: -1.75rem -1.75rem 1.25rem;
  height: 120px;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.75);
  transition: filter .3s;
}
a.ref-card:hover .ref-card-visual { filter: brightness(1); }

.ref-card-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.ref-tag {
  font-family: 'Courier New', monospace;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: .1rem .45rem;
}

.ref-card h4 {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: .5rem;
  line-height: 1.35;
}

.ref-card p {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ─── ABOUT ───────────────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  line-height: 1.85;
  font-size: .975rem;
  margin-bottom: 1rem;
}

.about-text p:last-child { margin-bottom: 0; }

.about-facts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.fact-item {}

.fact-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: .2rem;
}

.fact-label {
  font-size: .8rem;
  color: var(--muted);
  letter-spacing: .02em;
}

/* ─── MILESTONES ──────────────────────────────────── */

.milestones-wrap {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.milestones-label {
  font-family: 'Courier New', monospace;
  font-size: .7rem;
  letter-spacing: .15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.milestones-list {
  display: flex;
  flex-direction: column;
}

.milestone-row {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.milestone-key {
  font-family: 'Courier New', monospace;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: .1em;
  flex-shrink: 0;
}

.milestone-desc {
  font-size: .875rem;
  color: var(--text);
  line-height: 1.55;
}

@media (max-width: 540px) {
  .milestone-row {
    grid-template-columns: 1fr;
    gap: .2rem;
  }
}

/* ─── CONTACT ─────────────────────────────────────── */

#contact {
  background: var(--surface);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
  margin-top: 2.5rem;
}

/* — Info column — */

.contact-info-lead {
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
}

.contact-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon-box svg {
  width: 18px;
  height: 18px;
  fill: var(--accent);
}

.contact-item-body {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.contact-item-label {
  font-size: .72rem;
  font-family: 'Courier New', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-email {
  font-size: .975rem;
  font-weight: 500;
  color: var(--accent);
}
.contact-email:hover { color: var(--accent-h); }

.contact-item-body a {
  font-size: .975rem;
  font-weight: 500;
  color: var(--text);
}
.contact-item-body a:hover { color: var(--accent); }


/* — Form column — */

.contact-form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-form-title {
  font-size: .975rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1.1rem;
}

.form-group label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  padding: .65rem .9rem;
  transition: border-color .2s;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

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

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7590' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}

.form-group select option {
  background: var(--surface);
  color: var(--text);
}

.form-submit {
  width: 100%;
  padding: .75rem 1.5rem;
  margin-top: .35rem;
}

@media (max-width: 720px) {
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ─── APPROACH ─────────────────────────────────────── */

.approach-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.approach-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color .3s;
}

.approach-card:hover { border-color: var(--accent); }

.approach-num {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  opacity: .3;
  line-height: 1;
  margin-bottom: .8rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}

.approach-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .75rem;
}

.approach-card p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 600px) {
  .approach-grid { grid-template-columns: 1fr; }
}

/* ─── FOOTER ──────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: .8rem;
  color: var(--muted);
}

.footer-brand {
  font-family: 'Courier New', monospace;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--muted);
  transition: color .2s;
}
.footer-links a:hover { color: var(--text); }

/* ─── RESPONSIVE ──────────────────────────────────── */

@media (max-width: 720px) {
  nav { display: none; }

  .product-feature {
    grid-template-columns: 1fr;
  }
  .product-visual { order: -1; aspect-ratio: 16/7; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-facts {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
  }

  .footer-links { flex-wrap: wrap; gap: 1rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero { padding: 4.5rem 1.25rem 4rem; }
  .hero h1 { white-space: normal; }
  .section-inner { padding: 3.5rem 1.25rem; }
}
