:root {
  --paper: #f4f6f9;
  --ink: #0f2a4a;
  --ink-soft: #5b7290;
  --line: rgba(15, 42, 74, 0.09);
  --coral: #ff4f5e;
  --serif: "Fraunces", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --tech: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 32px; padding: 18px clamp(16px, 4vw, 56px);
  background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 15px/1 var(--sans); letter-spacing: 0.16em; }
.logo svg { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.logo svg .tail { stroke: var(--coral); }
.nav nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; }
.nav nav a { text-decoration: none; color: var(--ink-soft); }
.nav nav a:hover { color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 500; transition: background 0.2s; }
.btn:hover { background: #17406f; }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(16px, 3vw, 48px);
  min-height: calc(100svh - 76px); padding: 8px clamp(16px, 4vw, 56px) 40px; }
h1 { font: 400 clamp(40px, 4.6vw, 70px)/1.03 var(--serif); letter-spacing: -0.02em; margin: 0 0 26px; font-variation-settings: "opsz" 144; }
h1 .soft { color: var(--ink-soft); }
.lede { max-width: 33em; margin: 0 0 34px; color: #2c4564; font-size: clamp(17px, 1.25vw, 19px); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.promise { display: flex; align-items: center; gap: 10px; margin: 22px 0 0; color: var(--ink-soft); font-size: 15px; }
.promise .dot { width: 8px; height: 8px; border-radius: 50%; background: #1fae74; box-shadow: 0 0 0 4px rgba(31, 174, 116, 0.15); }

/* ---------- drawing ---------- */
.drawing { position: relative; margin: 0; }
#scene { display: block; width: 100%; height: auto; overflow: visible; touch-action: manipulation; }
#grid path { fill: none; stroke: var(--line); stroke-width: 1; }
.gridbg { mask: radial-gradient(ellipse 60% 60% at 55% 50%, #000 40%, transparent 78%); -webkit-mask: radial-gradient(ellipse 60% 60% at 55% 50%, #000 40%, transparent 78%); }

#plan .slab { fill: #fbfcfd; stroke: var(--ink); stroke-width: 1.1; }
#plan .slab-edge { fill: #e9eef4; stroke: var(--ink); stroke-width: 1; }
#plan .hatch { stroke: var(--ink); stroke-width: 0.6; opacity: 0.55; }
#plan .room { fill: transparent; stroke: none; cursor: pointer; transition: fill 0.35s; }
#plan .room.on { fill: rgba(255, 79, 94, 0.09); }
#plan .b polygon { stroke: var(--ink); stroke-width: 0.75; stroke-linejoin: round; }
#plan .b .ft { fill: #ffffff; }
#plan .b .fx { fill: #dfe6ee; }
#plan .b .fy { fill: #edf1f6; }
#plan .floor-label text { fill: var(--ink); pointer-events: none; }
#plan .floor-label .code { font: 500 17px var(--tech); fill: var(--coral); letter-spacing: 0.04em; }
#plan .floor-label .name { font: 400 23px var(--tech); }
#plan .dim line { stroke: var(--ink); stroke-width: 0.7; }
#plan .dim text { font: 13px var(--tech); fill: var(--ink-soft); }

.ink { fill: none; stroke: var(--coral); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.node .core { fill: #fff; stroke: var(--coral); stroke-width: 2; transition: r 0.3s; }
.node.on .core { fill: var(--coral); }
.node .halo { fill: none; stroke: var(--coral); stroke-width: 1.2; }
.ink-flow { fill: none; stroke: #fff; stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 2 26; opacity: 0.9; }

/* agent callout */
.callout { position: absolute; z-index: 3; width: min(300px, 78vw); padding: 14px 16px 12px; background: #fff; border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(15, 42, 74, 0.08); font: 14px/1.45 var(--tech); pointer-events: none; }
.callout::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 3px; background: var(--coral); }
.callout .room-name { margin: 0 0 8px; font: 500 15px var(--sans); }
.callout ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.callout li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; opacity: 0; transform: translateY(4px); transition: opacity 0.35s, transform 0.35s; }
.callout li.in { opacity: 1; transform: none; }
.callout li::before { content: ""; width: 9px; height: 9px; margin-top: 6px; border: 1.5px solid var(--coral); border-radius: 50%; }
.callout li.done::before { background: var(--coral); }

.hint { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font: 14px var(--tech); color: var(--ink-soft); white-space: nowrap; }
.hint-touch { display: none; }
@media (hover: none) { .hint-desktop { display: none; } .hint-touch { display: inline; } }

.next { padding: 80px clamp(16px, 4vw, 56px); color: var(--ink-soft); border-top: 1px solid var(--line); }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav { gap: 12px; padding: 12px 16px; }
  .nav nav { display: none; }
  .nav .btn.small { margin-left: auto; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 18px 16px 48px; gap: 8px; }
  h1 { font-size: clamp(36px, 10.5vw, 48px); margin-bottom: 16px; }
  .lede { margin-bottom: 24px; }
  .cta .btn { width: 100%; }
  .drawing { order: -1; margin: -6px -16px 6px; }
  .hint { bottom: 0; }
  .callout { width: min(260px, 70vw); font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .callout li { transition: none; }
}
