/* 후니전트 쇼케이스 — "The dark room": one dark field, and in it only the lit things.
   Working agents are the brightest thing on the first screen. */
@font-face {
  font-family: "Pretendard Variable";
  src: url("/fonts/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 930;
  font-display: swap;
}

:root {
  --bg: #0d060b;
  --surface: #1b0e17;
  --surface-2: #26141f;
  --line: #3b2534;
  --ink: #f6f1f4;
  --muted: #a89ca4;
  --accent: #ff488b;
  --accent-ink: #0d060b;
  --field: #ffffff;
  --field-ink: #101421;
  --field-muted: #4d5060;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(2.25rem, 1rem + 4.4vw, 4.5rem);

  --m: 32px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-body);
  line-height: 1.6;
  font-weight: 380;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}
a { color: inherit; }
p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.page { position: relative; z-index: 1; background: var(--bg); }

/* bar */
.bar { position: relative; z-index: 2; background: var(--bg); display: flex; justify-content: space-between; align-items: center; padding: 28px var(--m); }
.mark { text-decoration: none; font-weight: 600; letter-spacing: 0.18em; font-size: var(--step-small); }
.bar nav { display: flex; gap: 28px; font-size: var(--step-small); }
.bar nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.bar nav a:hover { color: var(--ink); }

/* hero */
.hero { min-height: calc(100svh - 84px); padding: 8px var(--m) 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.org { width: min(100%, 1000px, calc((100svh - 440px) * 1.83)); min-width: min(100%, 700px); }
.org-stage { position: relative; }
.org-stage svg { display: block; width: 100%; height: auto; overflow: visible; }
.org-stage.tall svg { max-width: 460px; margin: 0 auto; }
.org-note { margin-top: 14px; color: var(--muted); font-size: var(--step-small); }
.ticker { margin-top: 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; font-size: var(--step-small); color: var(--muted); }
.ticker li { background: var(--surface); border-radius: 999px; padding: 5px 13px; }
.ticker b { color: var(--ink); font-weight: 560; margin-right: 8px; }
.wordmark {
  margin-top: 44px;
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 300;
  letter-spacing: 0.62em;
  margin-right: -0.62em; /* trailing tracking */
  line-height: 1;
}
.statement { margin-top: 22px; font-size: var(--step-lead); font-weight: 340; color: var(--ink); }
.row { margin-top: 36px; display: flex; align-items: center; justify-content: center; gap: 48px; font-size: 15px; color: var(--muted); }
.action {
  display: inline-flex; align-items: center; height: 48px; padding: 0 26px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; border-radius: 999px;
  transition: transform .25s var(--ease), background-color .2s;
}
.action:hover { background: #ff6aa1; transform: translateY(-2px); }
.action:active { transform: translateY(0) scale(.98); }
.live { display: inline-flex; align-items: center; gap: 8px; min-width: 9em; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.live.stale .pulse { background: var(--muted); }

/* org chart (SVG, drawn by app.js) */
.org .edge { fill: none; stroke: var(--line); stroke-width: 1.5; }
.org .flow { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 12; stroke-linecap: round; }
.org .node rect { fill: var(--surface); transition: fill .6s var(--ease); }
.org .node .n { fill: var(--ink); font-size: 18px; font-weight: 560; transition: fill .6s; }
.org .node .r { fill: var(--muted); font-size: 14.5px; transition: fill .6s; }
.org .node .s { fill: var(--muted); font-size: 14.5px; transition: fill .6s; }
.org .node .dot { fill: var(--accent); opacity: 0; }
.org .node.working rect { fill: var(--ink); }
.org .node.working .n { fill: var(--bg); }
.org .node.working .r, .org .node.working .s { fill: #5d4c57; }
.org .node.working .dot { opacity: 1; }
.org .node.waiting rect { fill: var(--surface-2); }
.org .node.offline .n { fill: var(--muted); }
.org .node.me rect { fill: transparent; stroke: var(--line); stroke-width: 1.5; }
.org .node.me .n { fill: var(--muted); font-size: 14px; font-weight: 450; }
.org .label { fill: var(--muted); font-size: 14px; }
.org .node { cursor: default; }
.org .node:hover rect { fill: var(--surface-2); }
.org .node.working:hover rect { fill: #ffffff; }

/* numbers */
.numbers { padding: 200px var(--m) 160px; }
.figures + .figures-2 { margin-top: 40px; }
.figures-2 { margin-left: calc(100% / 12); max-width: 34ch; font-size: var(--step-lead); font-weight: 340; color: var(--muted); }
.figures-2 b { color: var(--ink); font-weight: 500; }
.figures {
  max-width: 17ch; margin-left: calc(100% / 12);
  font-size: var(--step-display); line-height: 1.14; font-weight: 300; letter-spacing: -0.02em; color: var(--muted);
}
.figures b { color: var(--ink); font-weight: 420; }

/* screens: lit panel, dark row */
.screens { display: grid; grid-template-columns: 1fr; align-content: center; padding: 40px 0 120px; position: relative; }
.reel {
  display: flex; gap: max(26vw, 380px); overflow-x: auto; scroll-snap-type: x mandatory; padding: 24px calc(50vw - 210px);
  scrollbar-width: none; cursor: grab; outline-offset: -4px;
}
.reel::-webkit-scrollbar { display: none; }
.reel.drag { cursor: grabbing; scroll-snap-type: none; }
.panel {
  flex: 0 0 420px; scroll-snap-align: center; background: var(--field); color: var(--field-ink);
  border-radius: 18px; padding: 22px 22px 20px; min-height: 420px;
  opacity: .28; transform: scale(.94); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.panel.on { opacity: 1; transform: none; }
.panel h3 { font-size: 15px; font-weight: 620; margin-bottom: 14px; color: var(--field-ink); }
.caption { position: absolute; left: calc(50vw + 250px); top: calc(50% - 196px); width: 22ch; text-align: left; padding-right: var(--m); }
.caption-name { font-size: var(--step-lead); font-weight: 340; }
.caption-lines { margin-top: 8px; color: var(--muted); font-size: 15px; }
.caption p { transition: opacity .3s; }
.caption.swap p { opacity: 0; }

.bars { position: relative; height: 330px; }
.bars svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bars .grid { stroke: #e9e6ea; stroke-width: 1; }
.bars .axis { fill: var(--field-muted); font-size: 11px; }
.bars .val { fill: var(--field-ink); font-size: 12px; font-weight: 600; }
.bars .bar { fill: var(--accent); transition: opacity .2s; }
.bars .bar.on { opacity: .75; }
.bars .hit { fill: transparent; }
.tip { position: absolute; pointer-events: none; background: var(--field-ink); color: #fff; border-radius: 8px; padding: 6px 9px; font-size: 12px; white-space: nowrap; transform: translate(-50%, calc(-100% - 8px)); }
.tip b { font-weight: 650; margin-right: 6px; }

.verdict .big { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 18px; }
.verdict .big strong { font-size: 64px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.verdict .big span { color: var(--field-muted); font-size: 15px; }
.verdict .stack { display: flex; height: 14px; gap: 2px; margin-bottom: 18px; }
.verdict .stack i { display: block; height: 100%; border-radius: 3px; background: #d9d4da; }
.verdict .stack i.pass { background: var(--accent); }
.verdict .stack i.fix { background: #8a5a7a; }
.verdict dl { display: grid; grid-template-columns: 1fr auto; row-gap: 10px; font-size: 15px; }
.verdict dt { color: var(--field-muted); display: flex; align-items: center; gap: 8px; }
.verdict dt i { width: 9px; height: 9px; border-radius: 2px; background: #d9d4da; }
.verdict dt i.pass { background: var(--accent); }
.verdict dt i.fix { background: #8a5a7a; }
.verdict dd { font-weight: 600; text-align: right; }

.feed li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 0; font-size: 14.5px; }
.feed li + li { box-shadow: inset 0 1px 0 #eeebef; } /* taste-skill-ignore: divider inside a data-ui fragment */
.feed .who { font-weight: 600; }
.feed time { color: var(--field-muted); font-size: 13px; }
.feed .what { grid-column: 1 / -1; color: var(--field-muted); font-size: 13.5px; }
.feed .what .done { color: #c2185b; font-weight: 600; }

.rank li { display: grid; grid-template-columns: 6.5em 1fr 3em; align-items: center; gap: 10px; padding: 7px 0; font-size: 14.5px; }
.rank .track { height: 10px; background: #f0edf1; border-radius: 3px; overflow: hidden; }
.rank .fill { display: block; height: 100%; background: var(--accent); border-radius: 0 3px 3px 0; transform-origin: left; transition: transform .9s var(--ease); }
.rank b { text-align: right; font-weight: 600; }

.today { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px; margin-top: 8px; }
.today div { background: #f6f4f7; border-radius: 12px; padding: 16px; }
.today dt { color: var(--field-muted); font-size: 13.5px; }
.today dd { font-size: 40px; font-weight: 320; letter-spacing: -0.02em; line-height: 1.15; margin-top: 4px; }
.today dd small { font-size: 14px; color: var(--field-muted); margin-left: 3px; }

/* channels: big names, fixed preview */
.channels { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: 120px var(--m) 180px; }
.names { grid-column: 1 / 8; }
.channels h2 { font-size: var(--step-lead); font-weight: 400; margin-bottom: 48px; }
.name-list li + li { margin-top: 4px; }
.name-btn {
  all: unset; box-sizing: border-box; display: block; width: 100%;
  padding: 10px 0 14px; cursor: pointer; color: var(--muted);
}
.name-btn .t { display: block; font-size: clamp(44px, 5vw, 72px); line-height: 1; font-weight: 300; letter-spacing: -0.03em; transition: color .3s; }
.name-btn .d { display: block; margin-top: 8px; font-size: 15px; color: var(--muted); transition: color .3s; }
.name-btn:hover .t, .name-btn[aria-pressed="true"] .t { color: var(--ink); }
.name-btn[aria-pressed="true"] .d { color: var(--ink); }
.name-btn:focus-visible { outline-offset: 6px; }
.recent { margin-top: 64px; max-width: 46rem; }
.recent h3 { font-size: 15px; font-weight: 500; color: var(--muted); margin-bottom: 10px; }
.recent-list li a { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 10px 0; text-decoration: none; transition: color .2s, transform .3s var(--ease); }
.recent-list li a:hover { color: var(--accent); transform: translateX(4px); }
.recent-list .v { color: var(--muted); font-size: 15px; white-space: nowrap; }
.frame-wrap { grid-column: 8 / 13; padding-top: 76px; }
.frame { position: sticky; top: 15vh; aspect-ratio: 16 / 10; background: var(--surface); overflow: hidden; }
.frame a { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.frame a.on { opacity: 1; z-index: 1; }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.9) contrast(1.05); }
.frame .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 18px 16px; font-size: 15px; line-height: 1.4; color: #fff; background: linear-gradient(transparent, rgb(13 6 11 / .85)); } /* taste-skill-ignore: neutral scrim under a caption on a photo */

/* GPS diary */
.gps { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: 40px var(--m) 180px; }
.gps-text { grid-column: 1 / 6; }
.gps-text h2 { font-size: var(--step-lead); font-weight: 400; }
.gps-lede { margin-top: 18px; font-size: clamp(26px, 2.4vw, 36px); line-height: 1.3; font-weight: 300; letter-spacing: -0.01em; }
.gps-steps { margin-top: 40px; display: grid; gap: 18px; counter-reset: s; }
.gps-steps li { color: var(--muted); font-size: 16px; }
.gps-steps b { display: block; color: var(--ink); font-weight: 520; margin-bottom: 2px; }
.gps-fig { grid-column: 6 / 13; }
.gps-map { height: 460px; background: var(--surface); border-radius: 18px; overflow: hidden; }
.gps-map .leaflet-tile-pane { filter: invert(1) hue-rotate(195deg) saturate(.35) brightness(.78) contrast(.95); }
.gps-map .leaflet-control-attribution { background: rgb(13 6 11 / .7); color: var(--muted); font-size: 11px; }
.gps-map .leaflet-control-attribution a { color: var(--ink); }
.gps-map .leaflet-tooltip { background: var(--ink); color: var(--bg); border: 0; font: 13px/1.3 "Pretendard Variable", sans-serif; box-shadow: none; }
.gps-band { position: relative; height: 14px; margin-top: 16px; background: var(--surface); border-radius: 4px; overflow: hidden; }
.gps-seg { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.gps-seg.moving { opacity: .55; }
.gps-hours { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); }
.gps-fig figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); }
.gps-list { margin-top: 10px; display: grid; gap: 6px; }
.gps-list li { display: grid; grid-template-columns: 10px 3.6em 1fr auto; gap: 10px; align-items: center; font-size: 15px; }
.gps-list i { width: 10px; height: 10px; border-radius: 50%; }
.gps-list .t, .gps-list .m { color: var(--muted); }
.gps-list b { font-weight: 450; }

/* footer: inverted, wordmark below */
.foot {
  position: relative;
  display: grid; grid-template-rows: auto auto; background: var(--field); color: var(--field-ink);
  padding: 40px var(--m) 20px;
}
.cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; font-size: 15.5px; color: var(--field-muted); }
.cols .first { color: var(--field-ink); font-weight: 600; margin-bottom: 6px; }
.cols a { color: var(--field-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.cols a:hover { color: #c2185b; }
.legal { margin-top: 48px; font-size: 13px; color: var(--field-muted); }
main { position: relative; z-index: 1; background: var(--bg); }

/* entrance */
.reveal-ready .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal-ready .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .pulse, .org .node.working .dot { animation: beat 2s ease-in-out infinite; }
  .org .flow { animation: flow 1.1s linear infinite; }
}
@keyframes beat { 50% { opacity: .3; } }
@keyframes flow { to { stroke-dashoffset: -36; } }
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
  .frame a, .panel, .rank .fill { transition: none; }
}

/* tablet */
@media (max-width: 1100px) {
  .reel { gap: 6vw; }
  .caption { position: static; width: auto; padding: 8px var(--m) 0; max-width: 32rem; }
  .figures, .figures-2 { margin-left: 0; }
  .hero .org { order: 5; margin-top: 64px; }
  .hero { min-height: 0; padding-top: 48px; }
  .wordmark { font-size: 40px; }
}
/* phone */
@media (max-width: 720px) {
  :root { --m: 20px; }
  .bar nav { gap: 18px; }
  .bar nav a:first-child { display: none; }
  .hero { padding-top: 24px; padding-bottom: 80px; }
  .wordmark { margin-top: 40px; font-size: 28px; letter-spacing: 0.5em; margin-right: -0.5em; }
  .statement { font-size: 6vw; max-width: 12em; }
  .row { flex-direction: column; gap: 14px; width: 100%; }
  .action { width: 100%; justify-content: center; }
  .numbers { padding: 72px var(--m) 96px; }
  .figures { font-size: 6.6vw; line-height: 1.2; max-width: none; }
  .screens { min-height: 0; padding: 40px 0 96px; }
  .reel { gap: 3vw; padding: 16px 7vw; }
  .org { min-width: 0; width: 100%; }
  .panel { flex-basis: 86vw; min-height: 360px; }
  .bars { height: 260px; }
  .channels { display: block; padding: 96px var(--m) 120px; }
  .frame-wrap { display: none; }
  .name-list li + li { margin-top: 40px; }
  .name-btn { display: block; padding: 0; }
  .name-btn .t { display: block; font-size: 9.5vw; color: var(--ink); margin-top: 14px; }
  .name-btn .d { display: block; font-size: 13px; margin-top: 6px; }
  .name-btn .thumb { display: block; aspect-ratio: 16 / 10; background: var(--surface); overflow: hidden; }
  .name-btn .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .cols { grid-template-columns: 1fr 1fr; row-gap: 32px; font-size: 15px; }
  .gps { display: block; padding: 24px var(--m) 120px; }
  .gps-fig { margin-top: 40px; }
  .gps-map { height: 340px; }
}
@media (min-width: 721px) { .name-btn .thumb { display: none; } }
