:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-soft: #2a2a2a;
  --line: #7a7a7a;
}

* { box-sizing: border-box; }

::selection { background: rgba(22, 93, 163, 0.2); }

html, body { margin: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", "Pretendard Variable", system-ui, -apple-system, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

html[lang="ko"] { word-break: keep-all; }

/* language toggle */
.lang {
  position: absolute;
  z-index: 3;
  top: 24px;
  right: 24px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--line);
  text-decoration: none;
  padding: 0 4px;
}
.lang:hover { outline: 0.5px solid var(--line); }

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 25vh 60px 64px;
  overflow: hidden;
}

/* wireframe factory floor: fills the viewport; the resting view keeps the drawing to the right */
.floor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  cursor: grab;
  --k: 1;
}
.floor.dragging { cursor: grabbing; }

/* scene controls, bottom right */
.controls {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 4px;
}
.controls button {
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--line);
  background: none;
  border: 0;
  padding: 0 6px;
  cursor: pointer;
}
.controls button:hover { outline: 0.5px solid var(--line); }

.copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
  pointer-events: none;
}
.copy a { pointer-events: auto; }

.sub {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* the logo before "operator" in the tagline */
.brand { color: var(--ink); white-space: nowrap; }
.logo {
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.15em;
  vertical-align: -0.2em;
  fill: currentColor;
}

.cta {
  display: inline-block;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
  text-decoration: none;
  margin: 0 -4px;
  padding: 0 4px;
}

.cta:hover { outline: 0.5px solid var(--line); }

/* hover zones (desktop) */
.zone polygon {
  fill: #000;
  fill-opacity: 0;
  stroke: none;
  pointer-events: all;
}

.zone.on polygon {
  fill-opacity: 0.035;
  stroke: var(--ink);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.zone.related polygon { fill-opacity: 0.025; }

.links { pointer-events: none; }
.links line {
  stroke: var(--ink);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}
.links circle { fill: var(--bg); stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }

.labels { pointer-events: none; }
.labels text {
  font-family: inherit;
  font-size: calc(12px * var(--k));
  text-anchor: middle;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.labels .label-link { font-size: calc(11px * var(--k)); fill: var(--ink-soft); }
.labels .label-related { fill: var(--line); }

/* zone card, placed next to the hovered area: bordered, title sitting on the border line */
.card {
  position: absolute;
  z-index: 2;
  width: 300px;
  padding: 16px 14px 14px;
  border: 0.5px solid var(--line);
  background: var(--bg);
  pointer-events: none;
}
.card-title {
  position: absolute;
  top: -10px;
  left: 10px;
  margin: 0;
  padding: 0 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--line);
  background: var(--bg);
}
.card-head {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}
.card-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

[hidden] { display: none; }

@media (max-width: 640px) {
  .hero { padding: 18vh 20px 48px; }
  .floor {
    inset: auto;
    width: 165%;
    left: -38%;
    top: 72%;
    transform: translateY(-72%);
    height: auto;
  }
  .zone, .controls { display: none; }
  .sub, .cta { font-size: 15px; }
}
