/* leejmotion.com — 이제이모션
   Drafting-paper palette. Orange is reserved for the setpoint / live signal. */

:root {
  --paper: #F2F4F1;
  --paper-2: #E7EBE7;
  --ink: #14191A;
  --graphite: #4B5559;
  --rule: #C3CBC6;
  --rule-soft: #D8DED9;
  --loop: #2D4A3E;
  --loop-text: #D3DCD6;
  --signal: #E06200;
  --signal-ink: #B04B00;

  --sans: "LJM Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --mono: "LJM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;          /* 17px */
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
:lang(en) body, body:lang(en) { line-height: 1.65; }

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, figure, ul, ol { margin: 0; }
a { color: inherit; }

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

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip:focus { left: 16px; }

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(242, 244, 241, 0.94);
  -webkit-backdrop-filter: saturate(1.2) blur(6px);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-logo { display: block; width: auto; height: 48px; }   /* 명함과 같은 로고 (마크 | 이제이모션 · Lee J motion) */
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  list-style: none;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: 6px 0;
  font-size: 0.9375rem;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--ink); }
.nav-toggle { display: none; }

/* ------------------------------------------------------------ type */
h1 {
  font-weight: 300;
  font-size: clamp(2.5rem, 4.6vw + 0.6rem, 4.25rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
}
h2 {
  font-weight: 600;
  font-size: clamp(1.75rem, 2vw + 1rem, 2.25rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
}
h3 {
  font-weight: 600;
  font-size: 1.1875rem;          /* 19px */
  line-height: 1.4;
}
.lead {
  margin-top: 24px;
  max-width: 34em;
  font-size: 1.1875rem;
  line-height: 1.75;
  color: var(--graphite);
}

/* ------------------------------------------------------------ buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--loop); border-color: var(--loop); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ------------------------------------------------------------ drawing surfaces */
.drawing-surface {
  border: 1px solid var(--rule);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(195, 203, 198, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(195, 203, 198, 0.55) 1px, transparent 1px),
    linear-gradient(to right, rgba(195, 203, 198, 0.28) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(195, 203, 198, 0.28) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: -1px -1px;
}

/* ------------------------------------------------------------ hero */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(64px, 9vw, 120px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.bench {
  justify-self: end;
  width: 100%;
  max-width: 520px;
  padding: 18px 20px 20px;
}
.bench-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
}
.bench-title {
  font-size: 0.875rem;
  font-weight: 600;
}
.readout {
  display: flex;
  gap: 18px;
}
.readout div { display: flex; align-items: baseline; gap: 6px; }
.readout dt { font-size: 0.8125rem; color: var(--graphite); }
.readout dd {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  min-width: 4.4ch;
  text-align: right;
}
.dial {
  width: 100%;
  max-width: 360px;
  margin: 10px auto 0;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  cursor: crosshair;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.dial:focus-visible { outline-offset: 6px; }
.dial-svg { width: 100%; height: 100%; }
.d-face { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.d-tick { stroke: var(--graphite); stroke-width: 1; }
.d-tick-major { stroke: var(--ink); stroke-width: 1.5; }
.d-label {
  fill: var(--graphite);
  font-family: var(--mono);
  font-size: 12px;
  text-anchor: middle;
  dominant-baseline: central;
}
.d-setline { stroke: var(--signal); stroke-width: 1.5; stroke-dasharray: 4 4; }
.d-tgt-ring { fill: var(--paper); stroke: var(--signal); stroke-width: 2.5; }
.d-tgt-dot { fill: var(--signal); }
.d-needle-line { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.d-needle-tail { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.d-hub { fill: var(--ink); }
.d-hub-dot { fill: var(--paper); }

.trace { width: 100%; height: auto; margin-top: 8px; overflow: visible; }
.t-grid { stroke: var(--rule-soft); stroke-width: 1; }
.t-axis { stroke: var(--graphite); stroke-width: 1; }
.t-ref { fill: none; stroke: var(--signal); stroke-width: 1.5; }
.t-resp { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.t-label { fill: var(--graphite); font-family: var(--mono); font-size: 11px; }
.t-key { fill: var(--graphite); font-family: var(--sans); font-size: 12px; }
.bench figcaption {
  margin-top: 10px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--graphite);
}

/* ------------------------------------------------------------ sections */
.section {
  padding-block: clamp(64px, 9vw, 120px);
  border-top: 1px solid var(--rule);
}
.section-tint { background: var(--paper-2); }
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }
.section-head { max-width: 40em; }
.section-head p {
  margin-top: 16px;
  max-width: 36em;
  color: var(--graphite);
}

/* business: the drive chain */
.chain {
  --chain-gap: 56px;
  list-style: none;
  padding: 0;
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--chain-gap);
}
.chain-item { position: relative; }
.chain-top {
  display: flex;
  align-items: center;
  height: 96px;
}
.chain-ill { flex: none; width: auto; height: 96px; color: var(--ink); }
/* the cable that runs to the next device */
.chain-top::after {
  content: "";
  flex: 1 1 auto;
  height: 7px;
  margin-left: 8px;
  margin-right: calc(8px - var(--chain-gap));
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}
.chain-item:last-child .chain-top::after { display: none; }
.chain-item h3 { margin-top: 22px; }
.chain-item p, .cable-note p { margin-top: 8px; font-size: 1rem; color: var(--graphite); }
.reg {
  font-size: 0.8125rem !important;
  line-height: 1.6;
}
.reg span {
  display: block;
  color: var(--ink);
  font-weight: 600;
}
.ic, .ic-thin { fill: none; stroke: currentColor; stroke-linejoin: round; stroke-linecap: round; }
.ic { stroke-width: 1.5; }
.ic-thin { stroke-width: 1; }

.cable-note {
  display: grid;
  grid-template-columns: 120px minmax(0, 40em);
  gap: 8px 32px;
  align-items: start;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--rule);
}
.cable-ill { width: 120px; height: 40px; color: var(--ink); margin-top: 2px; }

/* technology: the loop drawing */
.loop {
  margin-top: 48px;
  padding: clamp(16px, 3vw, 32px);
}
.loop-wide { width: 100%; height: auto; }
.loop-tall { display: none; width: 100%; max-width: 360px; height: auto; margin-inline: auto; }
.loop figcaption {
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--graphite);
}
.lp-block { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.lp-text { fill: var(--ink); font-family: var(--sans); font-weight: 600; text-anchor: middle; }
.lp-sub { font-weight: 400; fill: var(--graphite); }
.lp-line { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.lp-sig { stroke: var(--signal); }
.lp-head { fill: var(--ink); }
.lp-head-sig { fill: var(--signal); }
.lp-sum { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.lp-dot { fill: var(--ink); }
.lp-dsp { fill: none; stroke: var(--loop); stroke-width: 1.5; stroke-dasharray: 7 5; }
.lp-var { fill: var(--graphite); font-family: var(--mono); font-size: 14px; }
.lp-note { fill: var(--graphite); font-family: var(--sans); font-size: 13px; }
.lp-strong { fill: var(--loop); font-weight: 600; font-size: 14px; }
.lp-leader { fill: none; stroke: var(--ink); stroke-width: 1; }
.lp-balloon circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.lp-balloon text {
  fill: var(--ink);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  text-anchor: middle;
}

.tech-list {
  list-style: none;
  padding: 0;
  margin-top: 48px;
  counter-reset: tech;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 48px;
}
.tech-list li {
  counter-increment: tech;
  position: relative;
  padding-left: 44px;
}
.tech-list li::before {
  content: counter(tech);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font: 500 13px/25px var(--mono);
  text-align: center;
}
.tech-list p { margin-top: 6px; font-size: 1rem; color: var(--graphite); }
.tech-note {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  max-width: 48em;
  font-size: 0.9375rem;
  color: var(--graphite);
}

/* process: a real sequence, so it is numbered */
.steps {
  list-style: none;
  padding: 0;
  margin-top: 56px;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 56px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font: 500 14px/32px var(--mono);
  text-align: center;
}
.steps li::after {
  content: "";
  position: absolute;
  top: 15.25px;
  left: 40px;
  right: -24px;
  height: 1.5px;
  background: var(--ink);
}
.steps li:last-child::after { display: none; }
.steps p { margin-top: 8px; font-size: 1rem; color: var(--graphite); }

/* company */
.company-about { max-width: 34rem; }
.company-about > p { margin-top: 20px; color: var(--graphite); }

/* footer */
.site-footer { padding-block: 36px 44px; }
.footer-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px 32px;
  align-items: start;
}
.footer-logo { display: block; width: auto; height: 40px; }
.footer-text { font-size: 0.875rem; line-height: 1.7; color: var(--graphite); }
.biz { display: flex; flex-wrap: wrap; gap: 0 0; }
.biz span + span::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 11px;
  margin: 0 10px;
  background: var(--rule);
  vertical-align: -1px;
}
.footer-lang { font-size: 0.875rem; text-underline-offset: 3px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .tech-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .steps li:nth-child(3)::after { display: none; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .bench { justify-self: start; }
  .chain { --chain-gap: 40px; }
  .loop-wide { display: none; }
  .loop-tall { display: block; }
}

@media (max-width: 879px) {
  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1.5px solid var(--ink);
    border-radius: 3px;
    background: transparent;
    color: var(--ink);
    font: 600 0.9375rem/1 var(--sans);
    cursor: pointer;
  }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 4px var(--gutter) 12px;
  }
  .js .site-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule-soft);
  }
  .js .site-nav li:last-child a { border-bottom: 0; }
  /* without JS the menu simply wraps under the brand */
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 8px; }
  html:not(.js) .site-nav ul { gap: 0 18px; }
}

@media (max-width: 719px) {
  body { font-size: 1rem; }
  .lead { font-size: 1.0625rem; }
  .chain { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .chain-item {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    column-gap: 16px;
    padding-bottom: 36px;
  }
  .chain-item:last-child { padding-bottom: 0; }
  .chain-top {
    grid-row: 1 / span 4;
    width: 104px;
    height: auto;
    justify-content: center;
    align-items: flex-start;
  }
  .chain-top::after { display: none; }
  .chain-ill { height: 72px; }
  .chain-item h3 { margin-top: 4px; }
  /* on phones the cable runs down to the next device */
  .chain-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 80px;
    bottom: 4px;
    left: 48.5px;
    width: 7px;
    border-left: 1.5px solid var(--ink);
    border-right: 1.5px solid var(--ink);
  }
  .cable-note { grid-template-columns: minmax(0, 1fr); }
  .tech-list { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps li { padding: 0 0 32px 52px; }
  .steps li:last-child { padding-bottom: 0; }
  .steps li::after,
  .steps li:nth-child(3)::after {
    display: block;
    top: 40px;
    bottom: 8px;
    left: 15.25px;
    right: auto;
    width: 1.5px;
    height: auto;
  }
  .steps li:last-child::after { display: none; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .readout { gap: 12px; }
  .bench { padding: 14px 14px 16px; }
}

@media (max-width: 380px) {
  .brand-logo { height: 40px; }
  .readout dt { font-size: 0.75rem; }
  .readout dd { font-size: 0.875rem; min-width: 4ch; }
}

@media print {
  .site-header { position: static; }
  .nav-toggle, .bench { display: none; }
}
