/* Unlocked Models: amber phosphor terminal for hackers.
   Visual system: elayadesign landing-page-design Part B (one face Geist Mono, Pretendard only as Hangul fallback,
   flat dark backgrounds, Tailwind type scale, fixed spacing tokens, base curve cubic-bezier(0.22,1,0.36,1)).
   Section motion: design-to-motion, website context (card intro on 30% visibility, story loops paused off screen). */
:root {
  --bg: #000000; --s1: #131209; --s2: #181818; --s3: #1f1f1f;
  --line: #272727; --line2: #313131;
  --fg: #ededed; --dim: #8f8c84; --a: #ffb000; --a2: rgba(255, 176, 0, 0.16); --r: #ff5f4a; --ok: #7bd88f;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --e: cubic-bezier(0.16, 1, 0.3, 1); --e2: cubic-bezier(0.33, 1, 0.68, 1); --io: cubic-bezier(0.65, 0, 0.35, 1);
  --font: "Geist Mono", "Pretendard Variable", Pretendard, ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 96px; }
body { color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 24px; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; overflow-x: hidden; }
a { color: var(--a); text-decoration: none; transition: color 300ms var(--ease), opacity 300ms var(--ease); }
a:hover { opacity: 0.8; }
h1, h2, h3, .tag-text { text-wrap: balance; font-weight: 600; }
p, li, td, dd, summary { text-wrap: pretty; }
code { color: var(--a); }
.a { color: var(--a); }
.dim { color: var(--dim); }
:focus-visible { outline: 2px solid var(--a); outline-offset: 4px; border-radius: 4px; }
html[lang="ko"] [data-en], html[lang="en"] [data-ko] { display: none !important; }
::selection { background: var(--a); color: #000; }

.skip { position: absolute; left: 16px; top: -64px; background: var(--a); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 50; font-weight: 600; transition: transform 300ms var(--ease); }
.skip:focus { transform: translateY(80px); opacity: 1; }

/* Nav: floating, centered, sized to content (B7) */
.nav-wrap { position: fixed; top: 16px; left: 0; right: 0; z-index: 30; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.nav { pointer-events: auto; display: flex; align-items: center; gap: 24px; padding: 8px 8px 8px 16px; background: rgba(19, 18, 9, 0.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 16px; font-size: 14px; line-height: 20px; max-width: 100%; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; color: var(--fg); }
.brand:hover { opacity: 1; }
.lock { width: 16px; height: 16px; color: var(--a); flex: none; }
.lock .shackle { transform-origin: 75% 60%; transition: transform 500ms var(--ease); }
.brand:hover .lock .shackle { transform: rotate(-22deg) translateY(-1px); }
.links { display: flex; gap: 16px; }
.links a { color: var(--dim); white-space: nowrap; }
.links a:hover, .links a.on { color: var(--fg); opacity: 1; }
.links a.on::before { content: "> "; color: var(--a); }
.lang { background: none; border: 0; color: var(--dim); font: inherit; cursor: pointer; display: flex; gap: 4px; padding: 4px; border-radius: 4px; white-space: nowrap; }
.lang .sep { color: var(--line2); }
.lang [data-l].on { color: var(--fg); }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--a); color: #000; font-weight: 600; font-size: 16px; line-height: 24px; padding: 8px 12px; border-radius: 8px; transition: transform 300ms var(--ease), opacity 300ms var(--ease); white-space: nowrap; }
.btn:hover { transform: translateY(-2px); opacity: 1; }
.btn:active { transform: scale(0.98); }
.btn-sm { font-size: 14px; line-height: 20px; }
.btn i { font-size: 16px; }
.menu-btn { display: none; width: 40px; height: 40px; background: none; border: 0; cursor: pointer; position: relative; border-radius: 8px; }
.menu-btn span { position: absolute; left: 12px; right: 12px; top: 19px; height: 2px; background: var(--fg); transition: transform 500ms var(--ease); }
.menu-btn span:first-child { transform: translateY(-4px); }
.menu-btn span:last-child { transform: translateY(4px); }
.menu-btn[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
.sheet { position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); display: flex; flex-direction: column; gap: 24px; padding: 96px 24px 48px; font-size: 30px; line-height: 36px; font-weight: 600; }
.sheet[hidden] { display: none; }
.sheet a { color: var(--fg); opacity: 0; transform: translateY(24px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.sheet a span.n { color: var(--a); font-size: 14px; line-height: 20px; margin-right: 12px; }
.sheet.open a { opacity: 1; transform: none; }

main { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* Hero */
.hero { position: relative; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 64px; align-items: center; padding: 128px 0 80px; }
.hex { position: absolute; inset: 0 -40px; z-index: -1; pointer-events: none; overflow: hidden; }
.hex canvas { width: 100%; height: 100%; display: block; opacity: 0.55; }
.prompt { font-size: 14px; line-height: 20px; color: var(--dim); margin-bottom: 24px; }
.prompt b { color: var(--a); font-weight: 500; }
.cursor { display: inline-block; width: 8px; height: 16px; background: var(--a); vertical-align: -3px; margin-left: 4px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.grad { background: linear-gradient(90deg, #ffffff, #9b9b9b); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1 { font-size: 48px; line-height: 1; letter-spacing: -0.02em; max-width: 680px; }
.sub { font-size: 18px; line-height: 28px; color: var(--dim); max-width: 680px; margin-top: 24px; }
.cta-row { margin-top: 32px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.proofline { font-size: 14px; line-height: 20px; color: var(--dim); }
.proofline b { color: var(--fg); font-weight: 500; white-space: nowrap; }
br.mb { display: none; }
.scope { margin-top: 48px; max-width: 560px; font-size: 14px; line-height: 20px; color: var(--dim); display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.scope i { color: var(--a); font-size: 20px; line-height: 20px; }

/* Terminal card (hero scanner, license linter) */
.term { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 16px; color: var(--dim); }
.term-bar i { width: 8px; height: 8px; border-radius: 9999px; background: var(--line2); }
.term-bar i.live { background: var(--a); position: relative; }
.term-bar i.live::after { content: ""; position: absolute; inset: 0; border-radius: 9999px; background: var(--a); animation: ring 2s var(--e2) infinite; }
@keyframes ring { from { transform: scale(1); opacity: 0.55; } to { transform: scale(2.6); opacity: 0; } }
.term-bar span { margin-left: 8px; }
.term-body { font-size: 12px; line-height: 24px; padding: 16px; min-height: 336px; color: var(--fg); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.term-body .ln { display: flex; gap: 12px; white-space: pre; opacity: 0; transform: translateY(8px); filter: blur(4px); transition: opacity 700ms var(--e2), transform 1050ms var(--e), filter 700ms var(--e2); }
.term-body .ln.in { opacity: 1; transform: none; filter: none; }
.term-body .cmd { white-space: pre-wrap; word-break: break-all; }
.term-body .cmd::before { content: "$ "; color: var(--a); }
.term-body .caret { display: inline-block; width: 8px; height: 16px; background: var(--a); vertical-align: -3px; animation: blink 1s steps(1) infinite; }
.term-body .k { color: var(--dim); }
.term-body .w { color: var(--r); }
.term-body .o { color: var(--ok); }
.term-body .y { color: var(--a); }
.term-body .grow { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.term figcaption { font-size: 12px; line-height: 16px; color: var(--dim); padding: 0 16px 16px; }

/* Sections */
.sec { padding: 96px 0; border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; gap: 24px; margin-bottom: 48px; }
.num { font-size: 14px; line-height: 20px; color: var(--a); min-width: 32px; }
h2 { font-size: 36px; line-height: 40px; letter-spacing: -0.01em; max-width: 760px; }
.lead { margin: -24px 0 48px 56px; max-width: 760px; color: var(--dim); }
h3 { font-size: 16px; line-height: 24px; margin: 48px 0 12px; }
.body { margin-left: 56px; }
.body > h3:first-child { margin-top: 0; }
.prose { max-width: 760px; color: var(--dim); }
.prose p + p { margin-top: 16px; }
.prose strong { color: var(--fg); font-weight: 600; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }

.panel { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.panel figcaption { font-size: 14px; line-height: 20px; color: var(--dim); margin-top: 12px; }
.panel svg { display: block; width: 100%; height: auto; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 24px; transition: transform 500ms var(--ease), border-color 300ms var(--ease); }
.card:hover { transform: translateY(-4px); border-color: var(--line2); }
.card h4 { font-size: 16px; line-height: 24px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.card h4 i { color: var(--a); font-size: 20px; }
.card p, .card li { font-size: 14px; line-height: 20px; color: var(--dim); }
.card ul { padding-left: 16px; margin-top: 12px; }
.card li + li { margin-top: 4px; }
.card b { color: var(--fg); font-weight: 600; }

/* Tables */
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
thead th { background: var(--s2); color: var(--dim); font-weight: 500; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color 300ms var(--ease); }
tbody tr:hover { background: var(--s1); }
td.mono { white-space: nowrap; }
.filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filter button { font: inherit; font-size: 12px; line-height: 16px; background: var(--s1); color: var(--dim); border: 1px solid var(--line2); border-radius: 9999px; padding: 4px 12px; cursor: pointer; transition: background-color 300ms var(--ease), color 300ms var(--ease), transform 300ms var(--ease); }
.filter button:hover { color: var(--fg); }
.filter button:active { transform: scale(0.98); }
.filter button.on { color: #000; background: var(--a); border-color: var(--a); }
.search { display: flex; align-items: center; gap: 8px; background: var(--s1); border: 1px solid var(--line2); border-radius: 9999px; padding: 4px 12px; font-size: 12px; line-height: 16px; color: var(--a); }
.search input { font: inherit; background: none; border: 0; color: var(--fg); outline: none; min-width: 160px; }
.count { font-size: 12px; line-height: 16px; color: var(--dim); margin-left: auto; }
.empty { display: none; padding: 24px; text-align: center; color: var(--dim); font-size: 14px; line-height: 20px; }
.empty.show { display: block; }
.tag { display: inline-block; font-size: 12px; line-height: 16px; padding: 0 4px; border-radius: 4px; border: 1px solid var(--line2); color: var(--dim); white-space: nowrap; }
.tag.warn { border-color: rgba(255, 95, 74, 0.5); color: var(--r); }
.tag.ok { border-color: rgba(123, 216, 143, 0.4); color: var(--ok); }

/* Quotes */
.quote { border: 1px solid var(--line); border-radius: 16px; padding: 16px 24px; background: var(--s1); font-size: 14px; line-height: 20px; max-width: 840px; }
.quote mark { background: none; color: var(--r); }
.quote cite { display: block; color: var(--dim); font-style: normal; margin-top: 8px; font-size: 12px; line-height: 16px; }
.quote + p { margin-top: 12px; }

/* Memory bars (DeepSeek V4.1) */
.mem { display: grid; gap: 12px; }
.mem-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; font-size: 12px; line-height: 16px; }
.mem-row .lbl { color: var(--dim); }
.mem-row.hot .lbl { color: var(--fg); }
.mem-track { position: relative; height: 24px; border-radius: 4px; background: var(--s3); }
.mem-bar { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--line2); clip-path: inset(0 100% 0 0); transition: clip-path 1000ms var(--io), background-color 300ms var(--ease); }
.mem-row.hot .mem-bar { background: var(--a); }
.mem-val { position: absolute; top: 4px; left: 8px; color: var(--fg); mix-blend-mode: difference; opacity: 0; transition: opacity 700ms var(--e2); }
.play .mem-val { opacity: 1; }
.mem-wrap { position: relative; padding: 24px 0 32px; }
.mem-axis { position: absolute; left: 112px; right: 0; top: 0; bottom: 0; pointer-events: none; font-size: 12px; line-height: 16px; color: var(--dim); }
.mem-mark { position: absolute; top: 0; bottom: 0; border-left: 1px dashed rgba(237, 237, 237, 0.35); white-space: nowrap; transition: border-color 300ms var(--ease); }
.mem-mark span { position: absolute; bottom: 0; left: 4px; }
.mem-mark:nth-child(2) span { bottom: auto; top: 0; }
.mem-mark:nth-child(2).hit span, .mem-mark.hit span { color: var(--a); }
.mem-mark.hit { border-left-color: var(--a); color: var(--a); }
.fit { margin-top: 16px; font-size: 14px; line-height: 20px; min-height: 20px; color: var(--dim); }
.fit b { color: var(--a); font-weight: 500; }

/* Flow pipeline with travelling pulses */
.flow { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.flow li { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 24px; font-size: 14px; line-height: 20px; color: var(--dim); background: var(--bg); transition: border-color 500ms var(--ease), background-color 500ms var(--ease); }
.flow li b { display: block; color: var(--fg); font-size: 16px; line-height: 24px; margin-bottom: 8px; }
.flow li .n { display: block; color: var(--a); font-size: 12px; line-height: 16px; margin-bottom: 16px; }
.flow li.lit { border-color: var(--a); background: var(--s1); }
.flow li:not(:last-child)::after { content: ""; position: absolute; top: 50%; left: 100%; width: 24px; border-top: 1px dashed var(--line2); }
.flow .pulse { position: absolute; top: 50%; left: 100%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 9999px; background: var(--a); box-shadow: 0 0 0 4px var(--a2); opacity: 0; z-index: 1; }

/* Tagline reveal (B11) */
.tagline { padding: 160px 0; border-top: 1px solid var(--line); }
.tag-text { font-size: 48px; line-height: 1; max-width: 880px; letter-spacing: -0.01em; }
.tag-text .wd { color: rgba(237, 237, 237, 0.3); transition: color 500ms var(--ease); }
.tag-text .wd.on { color: var(--fg); }
.tag-text .wd.on.hl { color: var(--a); }

/* FAQ */
.faq { max-width: 840px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 24px; font-weight: 500; display: flex; justify-content: space-between; gap: 16px; transition: background-color 300ms var(--ease); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--a); transition: transform 300ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: var(--s1); }
.faq .ans { padding: 0 24px 24px; color: var(--dim); font-size: 14px; line-height: 20px; }

.final { padding: 128px 0; border-top: 1px solid var(--line); text-align: center; display: flex; flex-direction: column; align-items: center; }
.final h2 { font-size: 48px; line-height: 1; max-width: 760px; }
.final .sub { margin: 24px auto 32px; }

.src { font-size: 12px; line-height: 16px; color: var(--dim); columns: 2; column-gap: 32px; padding-left: 16px; }
.src li { break-inside: avoid; margin-bottom: 8px; }

.foot { max-width: 1200px; margin: 0 auto; padding: 32px 40px 48px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; font-size: 14px; line-height: 20px; color: var(--dim); flex-wrap: wrap; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { color: var(--dim); }
.foot-links a:hover { color: var(--fg); opacity: 1; }

/* Scroll reveal (B7) and card intro (design-to-motion B2, kind "card") */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.intro > * { opacity: 0; transform: translateY(24px) scale(0.985); filter: blur(6px); transition: opacity 800ms var(--e2), transform 1050ms var(--e), filter 800ms var(--e2); transition-delay: calc(var(--i, 0) * 85ms); }
.intro.in > * { opacity: 1; transform: none; filter: none; }
.intro.in > *:hover { transition-delay: 0ms; }

/* Legal / 404 */
.page { max-width: 680px; margin: 0 auto; padding: 160px 24px 96px; }
.page h1 { font-size: 36px; line-height: 40px; margin-bottom: 24px; }
.page h2 { font-size: 20px; line-height: 28px; margin: 48px 0 12px; }
.page p { color: var(--dim); margin-bottom: 16px; }
.glitch { font-size: 96px; line-height: 1; color: var(--a); margin-bottom: 24px; }

@media (max-width: 1100px) { .links a:nth-child(n+6) { display: none; } }
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 48px; min-height: auto; }
  .cols { grid-template-columns: 1fr; gap: 32px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow li:nth-child(2)::after { display: none; }
  .flow li:nth-child(2) .pulse { display: none; }
}
@media (max-width: 860px) { .links { display: none; } .menu-btn { display: block; } }
@media (max-width: 720px) {
  main { padding: 0 16px; }
  .nav .btn-sm { display: none; }
  .nav { gap: 12px; padding: 4px 4px 4px 16px; width: 100%; justify-content: space-between; }
  .lang { margin-left: auto; }
  h1 { font-size: 30px; line-height: 36px; }
  br.mb { display: inline; }
  .hex canvas { opacity: 0.25; }
  h2 { font-size: 24px; line-height: 32px; }
  .sub { font-size: 16px; line-height: 24px; }
  .sec { padding: 64px 0; }
  .sec-head { gap: 12px; margin-bottom: 32px; }
  .lead { margin: -16px 0 32px 0; }
  .body { margin-left: 0; }
  .cards, .flow { grid-template-columns: 1fr; }
  .flow li::after, .flow .pulse { display: none; }
  .tagline { padding: 96px 0; }
  .tag-text { font-size: 30px; line-height: 36px; }
  .final h2 { font-size: 36px; line-height: 40px; }
  .mem-row { grid-template-columns: 1fr; gap: 4px; }
  .mem-axis { display: none; }
  .mem-wrap { padding: 0; }
  .src { columns: 1; }
  .foot { padding: 32px 16px 48px; }
  .term-body { min-height: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .intro > * { transform: none; filter: none; transition: opacity 600ms linear; }
  .term-body .ln { transform: none; filter: none; transition: none; }
  .sheet a { transform: none; }
  .cursor, .term-body .caret, .term-bar i.live::after { animation: none; }
  .card:hover, .btn:hover { transform: none; }
}
