/* Frictiewereld UI kit — shared styles
   Imports the root design tokens and adds a few kit-only helpers. */
@import url('../../colors_and_type.css');

* { box-sizing: border-box; }
html, body, #app {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
}

/* ===== AppShell ===== */
.fw-app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--paper);
}

.fw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 36px;
}
.fw-header .logo img { height: 28px; display: block; }
.fw-header .menu {
  width: 44px; height: 44px;
  display: flex; flex-direction: column; gap: 5px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  cursor: pointer;
}
.fw-header .menu span {
  display:block; width: 22px; height: 2.5px; background: var(--ink); border-radius: 2px;
}

/* ===== Top journey bar ===== */
.fw-journey {
  display: flex; align-items: center; gap: 10px;
  max-width: 640px; margin: 0 auto;
}
.fw-journey .ctrl {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  font-size: 14px;
}
.fw-journey .track {
  position: relative;
  flex: 1;
  height: 22px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}
.fw-journey .fill {
  position:absolute; left:0; top:0; bottom:0;
  background: var(--ink);
  border-radius: 999px 0 0 999px;
  transition: width var(--dur-3) var(--ease-soft);
}
.fw-journey .marker {
  position:absolute; top:50%;
  transform: translate(-50%, -50%);
  width:14px; height:14px;
  border:1.5px solid var(--ink);
  border-radius:50%;
  background: var(--paper);
}
.fw-journey .marker .pin {
  position:absolute; left:50%; top:-22px;
  transform: translateX(-50%);
  width: 4px; height: 22px; background: var(--ink);
  border-radius: 2px;
}
.fw-journey .marker .pin::before {
  content:""; display:block; width: 14px; height: 14px;
  background: var(--ink); border-radius: 2px;
  position:absolute; top: -4px; left: -5px;
}
.fw-journey .traveler {
  position:absolute; top: -38px;
  transform: translateX(-50%);
  pointer-events:none;
  transition: left var(--dur-4) var(--ease-soft);
}
.fw-journey .traveler img { height: 56px; display:block;}

/* ===== Stage / canvas ===== */
.fw-stage {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 110px);
  padding: 8px 36px 64px;
}

.fw-stage-title {
  text-align: center;
  margin: 28px auto 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: -.02em;
  max-width: 1100px;
}
.fw-stage-sub {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 32px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}

.fw-canvas {
  position: relative;
  width: 100%;
  height: 600px;
  margin-top: 8px;
}

/* ===== Orb ===== */
.fw-orb {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease-out), background var(--dur-2);
  user-select: none;
}
.fw-orb:hover { transform: translate(-50%, -50%) scale(1.04); }
.fw-orb .letter {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 6px;
  line-height: 1;
}
.fw-orb .text {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.2;
  color: var(--ink-2);
}
.fw-orb.selected {
  background: var(--ink);
  color: var(--paper);
}
.fw-orb.selected .text { color: var(--paper); }
.fw-orb.clay { background: var(--clay); color: var(--paper); }
.fw-orb.clay .text { color: var(--paper); }
.fw-orb.moss { background: var(--moss-soft); }
.fw-orb.sky  { background: var(--sky-soft); }

/* ===== Capsule + figure ===== */
.fw-persona {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.fw-cap {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.fw-cap.dark { background: var(--ink); color: var(--paper); }
.fw-cap.clay { background: var(--clay); color: var(--paper); }

.fw-fig img { height: 60px; display:block; }
.fw-fig.lg img { height: 84px; }
.fw-fig.sm img { height: 44px; }

/* ===== Story panel (expanded node) ===== */
.fw-panel {
  position: absolute;
  width: 460px;
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  padding: 18px 22px;
}
.fw-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.fw-panel-tag { font-weight: 700; font-size: 15px; }
.fw-panel-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display:flex; align-items:center; justify-content:center;
  border: none; cursor: pointer; font-weight: 700;
}
.fw-panel-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.15;
  margin: 4px 0 12px;
}
.fw-panel-body {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ===== Buttons / pill ===== */
.fw-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease-out);
}
.fw-btn:hover { transform: translateY(-1px); }
.fw-btn.primary { background: var(--ink); color: var(--paper); }
.fw-btn.accent  { background: var(--clay); color: var(--paper); }
.fw-btn.ghost   { background: transparent; }
.fw-btn.sm { padding: 8px 14px; font-size: 13px; }

/* ===== Input ===== */
.fw-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  outline: none;
}
.fw-input:focus { border-color: var(--clay); box-shadow: 0 0 0 3px var(--clay-soft); }
.fw-textarea { resize: none; line-height: 1.5; min-height: 110px; font-family: var(--font-body); }

/* ===== Side menu (right drawer) ===== */
.fw-drawer-back {
  position: fixed; inset: 0;
  background: rgba(17,17,17,.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-3);
  z-index: 50;
}
.fw-drawer-back.open { opacity: 1; pointer-events: auto; }
.fw-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 360px;
  background: var(--paper);
  border-left: 1.5px solid var(--ink);
  padding: 28px;
  transform: translateX(100%);
  transition: transform var(--dur-3) var(--ease-out);
  z-index: 51;
  display: flex; flex-direction: column; gap: 14px;
}
.fw-drawer.open { transform: translateX(0); }
.fw-drawer h3 {
  font-family: var(--font-display); font-weight: 800; font-size: 28px;
  margin: 0 0 10px; letter-spacing:-.02em;
}
.fw-drawer .item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(17,17,17,.18);
  font-weight: 600; font-size: 16px;
  cursor: pointer;
}
.fw-drawer .item:hover { color: var(--clay); }

/* ===== Eyebrow / step pill ===== */
.fw-step-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* SVG connectors */
.fw-connectors {
  position: absolute; inset: 0;
  pointer-events: none;
}
.fw-connectors path {
  stroke: var(--ink);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}
.fw-connectors path.dashed {
  stroke-dasharray: 2 8;
}
