:root { --bg: #efeefc; --ink: #1b1a3c; --sub: #555472; --mute: #8b8aa6; --line: rgba(27,26,60,.1); --violet: #5b45f5; --card: rgba(255,255,255,.62); }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: "Plus Jakarta Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

/* nav, like the reference: logo left, three plain links, a white pill on the right */
.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; padding: 34px 6.5vw 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 21px; letter-spacing: -.01em; color: var(--ink); }
.brand .mk { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 6px 16px rgba(91,69,245,.25); }
.links { margin-left: auto; display: flex; gap: 32px; font-size: 15.5px; font-weight: 500; }
.links a:hover { color: var(--violet); }
.pill { margin-left: 40px; display: inline-flex; align-items: center; gap: 10px; background: #fff; padding: 11px 18px 11px 20px; border-radius: 12px; font-size: 15px; font-weight: 600; box-shadow: 0 6px 20px rgba(80,60,200,.08); }
.pill svg { width: 8px; height: 13px; }

/* hero: the rendered scene fills the frame, the copy sits on the left */
.hero { position: relative; height: 100vh; min-height: 640px; max-height: 1080px; overflow: hidden; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
/* the scene runs off the bottom of the frame: fade it into the page instead of a hard cut */
.hero-video { -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%); mask-image: linear-gradient(to bottom, #000 88%, transparent 100%); }
.hero-copy { position: absolute; left: 6.5vw; top: 50%; transform: translateY(-46%); max-width: 560px; }
.hero h1 { font-size: clamp(44px, 5.4vw, 86px); line-height: 1.02; font-weight: 600; letter-spacing: -.025em; }
.hero p { font-size: clamp(17px, 1.45vw, 22px); line-height: 1.5; color: var(--sub); margin-top: 18px; max-width: 470px; }
.btn { display: inline-flex; align-items: center; gap: 12px; margin-top: 30px; background: var(--ink); color: #fff; padding: 18px 28px; border-radius: 14px; font-size: 16px; font-weight: 600; box-shadow: 0 12px 30px rgba(27,26,60,.18); transition: transform .2s; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }

/* sections below the hero keep the same soft, light look */
.sec { padding: 120px 6.5vw 40px; max-width: 1340px; margin: 0 auto; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); background: rgba(91,69,245,.08); padding: 7px 14px; border-radius: 99px; }
.sec h2 { font-size: clamp(32px, 3.6vw, 54px); line-height: 1.08; font-weight: 600; letter-spacing: -.025em; margin-top: 20px; }
.cards { display: grid; gap: 20px; margin-top: 50px; }
.cards.three { grid-template-columns: repeat(3, 1fr); } .cards.two { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid rgba(255,255,255,.9); border-radius: 24px; padding: 32px; box-shadow: 0 20px 60px rgba(80,60,200,.07); backdrop-filter: blur(10px); }
.card .n { font: 500 14px "JetBrains Mono", monospace; color: var(--violet); }
.card h3 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin: 14px 0 10px; line-height: 1.25; }
.card p { color: var(--sub); line-height: 1.6; font-size: 16px; }
.find .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tk { font: 500 13px "JetBrains Mono", monospace; background: #fff; border: 1px solid var(--line); padding: 5px 10px; border-radius: 8px; }
.tag { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 99px; background: rgba(27,26,60,.06); color: var(--sub); }
.find.red .tag { background: rgba(240,70,90,.1); color: #d6334a; } .find.green .tag { background: rgba(30,170,110,.12); color: #128a57; }
.fine { color: var(--mute); font-size: 14px; margin-top: 22px; }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 46px; }
.tools div { background: var(--card); border: 1px solid rgba(255,255,255,.9); border-radius: 20px; padding: 24px; }
.tools code { font: 500 15px "JetBrains Mono", monospace; color: var(--violet); }
.tools p { color: var(--sub); font-size: 15px; line-height: 1.55; margin-top: 10px; }
.code { margin-top: 40px; background: var(--ink); color: #e9e8ff; border-radius: 22px; padding: 30px 34px; font: 15px/1.9 "JetBrains Mono", monospace; overflow-x: auto; box-shadow: 0 24px 60px rgba(27,26,60,.2); }
.code .c { color: #8f8cc0; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 70px 6.5vw 50px; color: var(--mute); font-size: 14px; max-width: 1340px; margin: 60px auto 0; border-top: 1px solid var(--line); }

.ext { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.ext a { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid rgba(255,255,255,.9); padding: 14px 20px; border-radius: 14px; font-weight: 600; font-size: 15px; box-shadow: 0 10px 30px rgba(80,60,200,.08); transition: transform .2s; }
.ext a:hover { transform: translateY(-2px); color: var(--violet); }
.ext svg { width: 18px; height: 18px; }
.ext span { font: 500 13px "JetBrains Mono", monospace; color: var(--mute); }
.flinks { display: flex; gap: 22px; } .flinks a:hover { color: var(--violet); }

.lead { color: var(--sub); font-size: 18px; line-height: 1.6; max-width: 720px; margin-top: 18px; }
.lead code, .way p b { font: 500 .92em "JetBrains Mono", monospace; color: var(--violet); }

/* engine pipeline */
.pipe { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 46px; counter-reset: s; }
.pipe li { position: relative; background: var(--card); border: 1px solid rgba(255,255,255,.9); border-radius: 22px; padding: 24px 22px; box-shadow: 0 20px 60px rgba(80,60,200,.06); display: flex; flex-direction: column; }
.pipe li:not(:last-child)::after { content: ""; position: absolute; right: -11px; top: 38px; width: 8px; height: 8px; border-top: 2px solid var(--violet); border-right: 2px solid var(--violet); transform: rotate(45deg); opacity: .5; }
.pipe .n { font: 500 13px "JetBrains Mono", monospace; color: var(--violet); }
.pipe h3 { font-size: 20px; font-weight: 600; margin: 10px 0 8px; }
.pipe p { color: var(--sub); font-size: 15px; line-height: 1.55; }
.pipe small { display: block; margin-top: auto; padding-top: 14px; color: var(--mute); font-size: 12.5px; line-height: 1.5; }
.score-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-top: 20px; }
.score-rules h3, .score-ex h3 { font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.score-rules table { width: 100%; border-collapse: collapse; font-size: 15px; }
.score-rules td { padding: 12px 10px 12px 0; border-top: 1px solid var(--line); vertical-align: top; }
.score-rules td:first-child { font-weight: 600; white-space: nowrap; } .score-rules td:nth-child(2) { white-space: nowrap; color: var(--sub); }
.score-rules td b { color: var(--violet); } .score-rules b.neg { color: #d6334a; } .score-rules .d { color: var(--sub); font-size: 14px; }
.score-ex h3 { margin: 14px 0 6px; } .score-ex p { color: var(--sub); font-size: 15px; }
.score-ex ul { list-style: none; margin-top: 14px; }
.score-ex li { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--sub); }
.score-ex li b { font: 600 14px "JetBrains Mono", monospace; color: var(--ink); }
.score-ex li.tot { border-top: 2px solid var(--ink); color: var(--ink); font-weight: 600; } .score-ex li.tot b { color: var(--violet); font-size: 16px; }
.score-ex .tag { background: rgba(91,69,245,.1); color: var(--violet); }

/* npm card + terminal */
.npm-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 20px; margin-top: 46px; align-items: stretch; }
.npm-card { display: flex; flex-direction: column; background: #fff; border-radius: 22px; padding: 28px; border: 1px solid rgba(255,255,255,.9); box-shadow: 0 20px 60px rgba(80,60,200,.08); transition: transform .2s; }
.npm-card:hover { transform: translateY(-3px); }
.npm-top { display: flex; align-items: center; gap: 8px; color: #cb3837; font-size: 13px; font-weight: 600; } .npm-top svg { width: 22px; height: 22px; }
.npm-name { font: 600 26px "JetBrains Mono", monospace; margin-top: 18px; letter-spacing: -.02em; }
.npm-name .ver { font-size: 14px; font-weight: 500; color: var(--mute); margin-left: 6px; }
.npm-sub { color: var(--mute); font-size: 13.5px; margin-top: 4px; }
.npm-card > p { color: var(--sub); font-size: 15px; line-height: 1.55; margin-top: 14px; }
.npm-install { margin-top: 18px; } .npm-install .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--sub); margin-bottom: 6px; }
.npm-install code { display: block; font: 500 14px "JetBrains Mono", monospace; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; background: #fafaff; }
.npm-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.npm-card dt { font-size: 12.5px; color: var(--mute); font-weight: 600; } .npm-card dd { font-size: 15px; font-weight: 600; margin-top: 2px; } .npm-card .wide { grid-column: 1 / -1; } .npm-card .wide dd { font: 500 13.5px "JetBrains Mono", monospace; }
.npm-open { margin-top: auto; padding-top: 18px; color: var(--violet); font-weight: 600; font-size: 15px; }
.term { background: var(--ink); border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgba(27,26,60,.22); display: flex; flex-direction: column; min-width: 0; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.16); } .term-bar span { margin-left: 10px; color: #8f8cc0; font: 12px "JetBrains Mono", monospace; }
.term pre { color: #e9e8ff; font: 13px/1.8 "JetBrains Mono", monospace; padding: 20px 22px 24px; overflow-x: auto; flex: 1; }
.term .ps { color: #a99cff; } .term .c { color: #8f8cc0; } .term .r { color: #ff8a9a; } .term .g { color: #6fe3a8; font-weight: 600; } .term .hl { color: #ffd38a; font-weight: 600; } .term b { color: #fff; }
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.way { background: var(--card); border: 1px solid rgba(255,255,255,.9); border-radius: 22px; padding: 26px; min-width: 0; }
.way .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(91,69,245,.1); color: var(--violet); font: 600 13px "JetBrains Mono", monospace; }
.way h3 { font-size: 19px; font-weight: 600; margin: 14px 0 12px; }
.way p { color: var(--sub); font-size: 14.5px; line-height: 1.55; margin-top: 12px; }
.cmd { display: flex; align-items: flex-start; gap: 8px; background: var(--ink); border-radius: 12px; padding: 12px 10px 12px 14px; }
.cmd code { flex: 1; min-width: 0; color: #e9e8ff; font: 12.5px/1.6 "JetBrains Mono", monospace; word-break: break-word; }
.cp { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: rgba(255,255,255,.08); color: #c9c6f5; cursor: pointer; }
.cp svg { width: 15px; height: 15px; } .cp:hover { background: rgba(255,255,255,.16); } .cp.ok { background: #5b45f5; color: #fff; }

@media (max-width: 1100px) { .pipe { grid-template-columns: repeat(2, 1fr); } .pipe li::after { display: none; } .score-wrap, .npm-grid, .ways { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .links { display: none; } .pill { margin-left: auto; }
  .nav { padding: 22px 16px 0; }
  .hero { height: auto; min-height: 0; max-height: none; padding: 120px 16px 0; display: flex; flex-direction: column; }
  .hero-copy { position: relative; left: 0; top: 0; transform: none; max-width: none; }
  .hero-video { position: relative; height: 380px; margin-top: 10px; object-position: 82% 50%; width: calc(100% + 32px); margin-left: -16px;
    -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent 100%); mask-image: linear-gradient(to bottom, #000 85%, transparent 100%); }
  .sec { padding: 80px 16px 20px; }
  .cards.three, .cards.two, .pipe { grid-template-columns: 1fr; }
  .score-rules td:nth-child(3) { display: none; } .term pre { font-size: 11px; }
  .code { font-size: 12.5px; padding: 22px; }
  .foot { padding: 50px 16px 40px; }
}
