/* MANTA Robotics
   Concept: 먹선. The page reads like a site drawing on bare concrete.
   One accent (chalk blue) is reserved for the chalk line and for things measured against it. */

:root {
  --concrete: #dcddd8;     /* page */
  --slab: #e8e8e4;         /* raised surfaces, figures */
  --form: #c6c8c2;         /* rules, borders */
  --ink: #1c2a3a;          /* manta navy: text */
  --ink-soft: #4b5765;     /* secondary text */
  --chalk: #2457c9;        /* chalk line, measured values */
  --chalk-dust: rgba(36, 87, 201, .16);
  --studio: #ebeced;       /* hero photo backdrop */

  --sans: "IBM Plex Sans KR", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans KR", "Noto Sans KR", sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --sec: clamp(72px, 10vw, 136px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--concrete);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; }

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

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 10; background: var(--slab); padding: 6px 10px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--concrete) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--form);
}
.top__in { display: flex; align-items: center; gap: 32px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand__mark { width: 30px; height: 18px; color: var(--ink); }
.nav { display: flex; gap: 24px; margin-left: auto; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }

.lang { font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.lang:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
html[lang="en"] { --sans: "IBM Plex Sans", "IBM Plex Sans KR", "Helvetica Neue", Arial, sans-serif; }
html[lang="en"] body { word-break: normal; }

.btn {
  display: inline-block;
  padding: 11px 20px;
  background: var(--ink);
  color: var(--concrete);
  text-decoration: none;
  font-weight: 500;
  border-radius: 2px;
  line-height: 1.4;
}
.btn:hover { background: #0f1a26; }
.btn--small { padding: 7px 14px; font-size: 14px; }
.link { color: var(--ink); text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* Hero */
.hero { padding-top: clamp(56px, 9vw, 112px); }
.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6.4vw, 80px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -.035em;
}
.lede { max-width: 33em; margin: 28px 0 0; font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-soft); }
.hero__actions { display: flex; align-items: center; gap: 24px; margin: 32px 0 0; }

.elevation { margin: clamp(40px, 6vw, 72px) 0 0; }
.elevation .chalk { margin-top: -1px; }
.elevation__band { background: var(--studio); }
.elevation__stage { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.elevation__stage img {
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.dims { position: absolute; inset: 0 var(--gutter); width: calc(100% - 2 * var(--gutter)); height: 100%; overflow: visible; }
.dims line { stroke: var(--ink); stroke-width: 2; }
.dims .ext { stroke-dasharray: 6 6; stroke-width: 1.5; opacity: .6; }
.dims circle { fill: var(--concrete); stroke: var(--ink); stroke-width: 2.5; }
.dims text { font-family: var(--cond); font-size: 28px; font-weight: 500; fill: var(--ink); }
.dims .dim text { fill: var(--chalk); }
.dims .dim line { stroke: var(--chalk); }

.chalk { position: relative; height: 3px; margin-top: -2px; }
.chalk__line {
  display: block; height: 100%;
  background: var(--chalk);
  box-shadow: 0 0 4px var(--chalk-dust);
  transform-origin: left center;
}
.js .chalk__line { transform: scaleX(0); }
.js .is-snapped .chalk__line { animation: draw .45s cubic-bezier(.2,.7,.2,1) .25s forwards; }
.js .is-snapped .chalk { animation: twang .5s ease-out .7s; }
@keyframes draw { to { transform: scaleX(1); } }
@keyframes twang {
  0% { transform: translateY(0); }
  20% { transform: translateY(-4px); }
  45% { transform: translateY(3px); }
  70% { transform: translateY(-1px); }
  100% { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .js .chalk__line { transform: none; animation: none !important; }
  .js .is-snapped .chalk { animation: none; }
}

.elevation__cap {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 14px; font-family: var(--cond); font-size: 14px; color: var(--ink-soft);
}
.elevation__tol { color: var(--chalk); }

/* Sections */
.sec { padding: var(--sec) 0 0; }
.grid { display: grid; grid-template-columns: 5fr 7fr; gap: 24px 64px; align-items: start; }
.sec__h {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -.03em;
  padding-top: 20px;
  position: relative;
}
.sec__h::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--ink); transform-origin: left center;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sec__h::before {
      animation: rule-in linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 30%;
    }
  }
}
@keyframes rule-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.sec__body { padding-top: 22px; }
.sec__body > p { margin: 0 0 1em; max-width: 36em; }
.sec__body > p:last-child { margin-bottom: 0; }

figure { margin: 0; }
figcaption { font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin-top: 10px; max-width: 46em; }

/* Facts */
.facts { margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--form); }
.facts div { padding: 18px 20px 0 0; }
.facts div + div { padding-left: 20px; border-left: 1px solid var(--form); }
.facts dt { font-size: clamp(24px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.facts dd { margin: 6px 0 0; font-size: 15px; line-height: 1.55; }
.facts small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); }

/* Localization feature */
.plan { margin-top: 48px; background: var(--slab); padding: clamp(16px, 3vw, 32px); }
.plan svg { width: 100%; height: auto; display: block; }
.plan__room { fill: none; stroke: var(--ink); stroke-width: 6; }
.plan__chalk { stroke: var(--chalk); stroke-width: 2.5; }
.plan__label { font-family: var(--cond); font-size: 15px; fill: var(--chalk); }
.plan__note { font-family: var(--cond); font-size: 15px; fill: var(--ink); }
.plan__drift { fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-dasharray: 5 6; }
.plan__true { fill: none; stroke: var(--ink); stroke-width: 3; }
.plan__fix circle { fill: var(--slab); stroke: var(--chalk); stroke-width: 3; }
.plan__block { fill: var(--form); stroke: var(--ink); stroke-width: 2; }
.plan figcaption { display: flex; gap: 24px; flex-wrap: wrap; }
.key::before { content: ""; display: inline-block; width: 26px; vertical-align: middle; margin-right: 8px; border-top: 3px solid var(--ink); }
.key--drift::before { border-top: 2px dashed var(--ink-soft); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.pair--uneven { grid-template-columns: 1.2fr 1fr; margin-top: 56px; }
.pair img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--slab); }

/* Steps: a real sequence, so numbered */
.steps { list-style: none; margin: 32px 0 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; padding: 16px 0; border-top: 1px solid var(--form); }
.steps li::before { content: counter(s); grid-row: span 2; font-family: var(--cond); font-weight: 500; color: var(--ink-soft); font-size: 15px; line-height: 1.9; }
.steps h3 { margin: 0; font-size: 18px; font-weight: 600; }
.steps p { margin: 2px 0 0; color: var(--ink-soft); font-size: 15.5px; }
.steps li:nth-child(4) h3 { color: var(--chalk); }

.side-fig { margin-top: 32px; }
.side-fig img { width: 100%; }
@media (min-width: 961px) { .sec__side { position: sticky; top: 84px; } }

/* Robot viewer */
.viewer { margin-top: 48px; display: grid; grid-template-columns: 1fr 300px; grid-template-rows: auto 1fr; gap: 0 40px; background: var(--slab); padding: clamp(16px, 3vw, 32px); }
.viewer__tabs { grid-column: 1; display: flex; gap: 4px; border-bottom: 1px solid var(--form); }
.viewer__tabs button {
  font: inherit; font-size: 15px; color: var(--ink-soft);
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 6px 12px 8px; margin-bottom: -1px; cursor: pointer;
}
.viewer__tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.viewer__img { grid-column: 1; display: flex; align-items: center; justify-content: center; min-height: 420px; padding: 24px 0; }
.viewer__img img { max-height: 520px; width: auto; object-fit: contain; }
.spec { grid-column: 2; grid-row: 1 / span 2; border-collapse: collapse; font-size: 15px; align-self: start; width: 100%; }
.spec caption, .kpi caption { text-align: left; font-weight: 600; padding-bottom: 10px; }
.spec th, .spec td, .kpi th, .kpi td { text-align: left; vertical-align: top; padding: 8px 0; border-top: 1px solid var(--form); font-weight: 400; }
.spec th, .kpi th { color: var(--ink-soft); width: 7.5em; padding-right: 12px; }

/* Progress */
.stages { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--form); }
.stage { padding: 20px 28px 0 0; }
.stage + .stage { padding-left: 28px; border-left: 1px solid var(--form); }
.stage h3 { margin: 0 0 10px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.stage h3::before { content: ""; width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 50%; }
.stage--done h3::before { background: var(--ink); }
.stage--now h3::before { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.stage ul { margin: 0; padding: 0; list-style: none; font-size: 15.5px; }
.stage li { padding: 7px 0; border-top: 1px dashed var(--form); }
.kpi { margin-top: 24px; border-collapse: collapse; width: 100%; font-size: 15px; }
.kpi td { color: var(--chalk); font-weight: 500; white-space: nowrap; }

/* Vision: scroll-linked cost stack */
.scrolly { display: grid; grid-template-columns: 5fr 7fr; gap: 0 64px; margin-top: 48px; }
.scrolly__chart { position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; gap: 24px; }
.stack { display: flex; flex-direction: column-reverse; width: 96px; height: min(58vh, 560px); }
.blk {
  flex: var(--h) 0 0; position: relative;
  background: var(--form); border-top: 2px solid var(--concrete);
  transition: background-color .5s ease;
}
.blk__l {
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  font-family: var(--cond); font-size: 13.5px; line-height: 1; white-space: nowrap; color: var(--ink-soft);
  transition: color .5s ease;
}
.scrolly[data-step="1"] .blk:is([data-g="1"]),
.scrolly[data-step="2"] .blk:is([data-g="1"], [data-g="2"]),
.scrolly[data-step="3"] .blk:is([data-g="1"], [data-g="2"], [data-g="3"]),
.scrolly[data-step="4"] .blk { background: var(--chalk); }
.scrolly[data-step="1"] .blk:is([data-g="1"]) .blk__l,
.scrolly[data-step="2"] .blk:is([data-g="1"], [data-g="2"]) .blk__l,
.scrolly[data-step="3"] .blk:is([data-g="1"], [data-g="2"], [data-g="3"]) .blk__l,
.scrolly[data-step="4"] .blk .blk__l { color: var(--ink); font-weight: 500; }

.tally { order: -1; margin: 0; display: flex; flex-direction: column; }
.tally__label { font-size: 14px; color: var(--ink-soft); }
.tally__num { font-size: clamp(34px, 4vw, 52px); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; color: var(--chalk); font-variant-numeric: tabular-nums; }
.tally__share { font-size: 14px; color: var(--ink-soft); }

.steps-v { list-style: none; margin: 0; padding: 0; }
.step { min-height: 72vh; padding: 20px 0 0; border-top: 1px solid var(--form); }
.step:last-child { min-height: 60vh; }
.step h3 { margin: 0; font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; letter-spacing: -.02em; }
.step__fig { margin: 6px 0 14px; font-family: var(--cond); font-size: 16px; color: var(--chalk); }
.step p:last-child { max-width: 30em; margin: 0; }
.js .step { opacity: .32; transition: opacity .4s ease; }
.js .step.is-active { opacity: 1; }
.note { margin: 24px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink-soft); max-width: 60em; }

@media (max-width: 960px) {
  .scrolly { grid-template-columns: 1fr; }
  .scrolly__chart {
    top: 60px; z-index: 2; gap: 8px;
    background: var(--concrete); padding: 12px 0; border-bottom: 1px solid var(--form);
  }
  .stack { flex-direction: row; width: 100%; height: 18px; }
  .blk { border-top: 0; border-right: 2px solid var(--concrete); }
  .blk__l { display: none; }
  .tally { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
  .tally__num { font-size: 28px; }
  .step { min-height: 62vh; }
}
@media (prefers-reduced-motion: reduce) {
  .blk, .blk__l, .js .step { transition: none; }
}

/* Team */
.people { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--form); }
.people li { padding: 20px 28px 0 0; }
.people li + li { padding-left: 28px; border-left: 1px solid var(--form); }
.people h3 { margin: 0; font-size: 21px; font-weight: 600; }
.people h3 span { font-size: 14px; font-weight: 400; color: var(--ink-soft); margin-left: 6px; }
.people__role { margin: 2px 0 10px; font-size: 15px; color: var(--chalk); }
.people p { font-size: 15px; margin-top: 0; }
.lab { margin: 40px 0 0; padding-top: 18px; border-top: 1px solid var(--form); font-size: 15px; color: var(--ink-soft); max-width: 60em; }

/* Contact */
.sec--contact { padding-bottom: var(--sec); }
.contact { margin-top: 24px !important; }
.addr { font-size: 14px; color: var(--ink-soft); }

.foot { border-top: 1px solid var(--form); padding: 22px 0 28px; font-size: 14px; color: var(--ink-soft); }
.foot__in { display: flex; justify-content: space-between; gap: 16px; }

/* Responsive */
@media (max-width: 960px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .grid { grid-template-columns: 1fr; }
  .viewer { grid-template-columns: 1fr; }
  .spec { grid-column: 1; grid-row: auto; margin-top: 16px; }
  .route { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .route::before { display: none; }
  .route li { border-top: 3px solid var(--chalk); padding-top: 20px; }
  .route li::before { top: -9px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .dims text { display: none; }
  .facts, .stages, .people { grid-template-columns: 1fr; }
  .facts div + div, .stage + .stage, .people li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--form); margin-top: 18px; }
  .pair, .pair--uneven { grid-template-columns: 1fr; }
  .route { grid-template-columns: 1fr; }
  .viewer__img { min-height: 260px; }
  .plan__note, .plan__label { font-size: 22px; }
  .share__labels { height: 48px; }
  .share__labels span:last-child { top: 26px; }
}
