/* Jarsight website. No JavaScript: every animation is CSS and stops
   for visitors who prefer reduced motion. */
:root {
  --bg: #071811; --bg2: #0a2018; --panel: #04110c; --panel2: #0c251b; --line: #1d4535;
  --text: #ecf5f0; --muted: #a8c3b7; --accent: #9fd8f5; --cyan: #d4f0ff;
  --crit: #ff6fa3; --high: #ff9180; --med: #ffc857; --low: #7cc4ff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 60%, var(--bg) 100%);
  color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .path, .fmt, .t { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: rgba(255,255,255,.07); padding: .1em .35em; border-radius: 4px; font-size: .88em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; position: relative; }
.muted { color: var(--muted); }

/* Background glow that slowly drifts */
.glow { position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background: radial-gradient(40vmax 30vmax at 20% 10%, rgba(212,240,255,.12), transparent 60%),
              radial-gradient(35vmax 25vmax at 85% 30%, rgba(159,216,245,.10), transparent 60%),
              radial-gradient(45vmax 35vmax at 50% 100%, rgba(20,110,70,.30), transparent 60%);
  animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(3vmax, -2vmax, 0) scale(1.05); } }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 750; font-size: 1.25rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
nav a { color: var(--muted); margin-left: 26px; font-size: .95rem; }
nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero { padding-top: 56px; padding-bottom: 8px; }
section { scroll-margin-top: 24px; }
h1 { font-size: clamp(3rem, 8vw, 5rem); line-height: 1; margin: 0; letter-spacing: -.04em; font-weight: 800; }
.tagline { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; margin: 10px 0 18px; letter-spacing: -.01em; }
.hl { background: linear-gradient(90deg, var(--accent), #c9ecff 40%, var(--cyan) 80%, var(--accent));
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 8s linear infinite; }
@keyframes shine { to { background-position: 300% 0; } }
.lead { font-size: 1.22rem; color: var(--muted); max-width: 740px; margin: 0; }

/* Section headings */
h2 { font-size: 1.7rem; line-height: 1.2; margin: 88px 0 12px; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; margin: 0 0 4px; }
.sub { color: var(--muted); max-width: 680px; margin: 0 0 32px; }

/* X-ray of the package */
.xray { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, rgba(4,17,12,.92), rgba(3,14,10,.92));
  background-image: linear-gradient(rgba(212,240,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(212,240,255,.05) 1px, transparent 1px);
  background-size: 28px 28px; background-color: var(--panel); }
.xhead { display: flex; justify-content: space-between; padding: 14px 22px; border-bottom: 1px solid var(--line);
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; }
.xhead .file { color: var(--accent); font-weight: 700; }
.beam { position: absolute; left: 0; right: 0; height: 90px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(212,240,255,.10) 60%, rgba(212,240,255,.55) 98%, transparent);
  border-bottom: 2px solid rgba(212,240,255,.85); box-shadow: 0 8px 24px rgba(212,240,255,.35);
  top: -90px; animation: sweep 7.2s cubic-bezier(.45,.05,.55,.95) infinite; }
@keyframes sweep { 0% { top: -90px; } 85%, 100% { top: 100%; } }
.row { position: relative; display: grid; grid-template-columns: 250px 1fr auto; gap: 24px; align-items: center;
  padding: 18px 22px; border-bottom: 1px dashed rgba(29,69,53,.9); }
.row:last-child { border-bottom: 0; }
.row::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(212,240,255,.13), transparent 70%);
  opacity: 0; animation: lit 7.2s ease-out infinite; }
.path { color: var(--text); font-size: .92rem; white-space: nowrap; }
.tree { color: var(--line); margin-right: 6px; }
.what p { margin: 0; color: var(--muted); font-size: .94rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 250px; }
.t { font-size: .74rem; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); color: var(--text);
  background: rgba(255,255,255,.04); white-space: nowrap; opacity: .35; transform: scale(.96);
  animation: pop 7.2s ease-out infinite; }
.t.crit { color: var(--crit); border-color: rgba(255,93,143,.5); }
.t.high { color: var(--high); border-color: rgba(255,123,107,.5); }
.t.med { color: var(--med); border-color: rgba(255,200,87,.5); }
.t.low { color: var(--low); border-color: rgba(124,196,255,.5); }
.osv { background: rgba(159,216,245,.05); }
.osv .path { color: var(--accent); }
@keyframes lit { 0% { opacity: 0; } 4% { opacity: 1; } 30% { opacity: 0; } 100% { opacity: 0; } }
@keyframes pop { 0% { opacity: .35; transform: scale(.96); } 3% { opacity: 1; transform: scale(1.08); } 8%, 70% { opacity: 1; transform: scale(1); } 90%, 100% { opacity: .35; transform: scale(.96); } }
.r1::before, .r1 .t { animation-delay: 0.55s; }
.r2::before, .r2 .t { animation-delay: 1.39s; }
.r3::before, .r3 .t { animation-delay: 2.23s; }
.r4::before, .r4 .t { animation-delay: 3.07s; }
.r5::before, .r5 .t { animation-delay: 3.91s; }
.r6::before, .r6 .t { animation-delay: 4.75s; }
.r7::before, .r7 .t { animation-delay: 5.59s; }


/* Workflow: animated terminal */
.flow { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 36px; align-items: start; margin-top: 30px; }
.term { background: #030e0a; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(212,240,255,.05); }
.bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #08170f; border-bottom: 1px solid var(--line); }
.bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff6159; }
.bar i:nth-child(2) { background: #ffbd2e; } .bar i:nth-child(3) { background: #28c941; }
.bar span { margin-left: 10px; color: var(--muted); font: .78rem ui-monospace, Menlo, Consolas, monospace; }
.term pre { margin: 0; padding: 18px 20px 22px; font-size: .8rem; line-height: 1.55; overflow-x: auto; min-height: 430px; }
.term .p { color: var(--accent); }
.term b { color: var(--text); }
.term .c { color: var(--crit); font-weight: 700; } .term .h { color: var(--high); font-weight: 700; } .term .m { color: var(--med); font-weight: 700; } .term .l { color: var(--low); font-weight: 700; }
.term .id { color: #7f9e91; } .term .d { color: #7f9e91; }
.cmd { display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; width: 0;
  animation: type 16s steps(22, end) infinite; }
@keyframes type { 0%, 3% { width: 0; } 14%, 94% { width: 22ch; } 97%, 100% { width: 0; } }
.caret { display: inline-block; width: .6em; height: 1.1em; vertical-align: text-bottom; background: var(--text);
  margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ln { opacity: 0; }
@keyframes s1 { 0%, 16.88% { opacity: 0; } 17.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l1 { animation: s1 16s linear infinite; }
@keyframes s2 { 0%, 17.88% { opacity: 0; } 18.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l2 { animation: s2 16s linear infinite; }
@keyframes s3 { 0%, 18.88% { opacity: 0; } 19.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l3 { animation: s3 16s linear infinite; }
@keyframes s4 { 0%, 19.88% { opacity: 0; } 20.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l4 { animation: s4 16s linear infinite; }
@keyframes s5 { 0%, 20.88% { opacity: 0; } 21.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l5 { animation: s5 16s linear infinite; }
@keyframes s6 { 0%, 21.88% { opacity: 0; } 22.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l6 { animation: s6 16s linear infinite; }
@keyframes s7 { 0%, 22.88% { opacity: 0; } 23.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l7 { animation: s7 16s linear infinite; }
@keyframes s8 { 0%, 23.88% { opacity: 0; } 24.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l8 { animation: s8 16s linear infinite; }
@keyframes s9 { 0%, 24.88% { opacity: 0; } 25.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l9 { animation: s9 16s linear infinite; }
@keyframes s10 { 0%, 25.88% { opacity: 0; } 26.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l10 { animation: s10 16s linear infinite; }
@keyframes s11 { 0%, 26.88% { opacity: 0; } 27.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l11 { animation: s11 16s linear infinite; }
@keyframes s12 { 0%, 27.88% { opacity: 0; } 28.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l12 { animation: s12 16s linear infinite; }
@keyframes s13 { 0%, 28.88% { opacity: 0; } 29.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l13 { animation: s13 16s linear infinite; }
@keyframes s14 { 0%, 29.88% { opacity: 0; } 30.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l14 { animation: s14 16s linear infinite; }
@keyframes s15 { 0%, 30.88% { opacity: 0; } 31.48%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l15 { animation: s15 16s linear infinite; }
@keyframes s16 { 0%, 31.87% { opacity: 0; } 32.47%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }
.l16 { animation: s16 16s linear infinite; }

.outputs { list-style: none; margin: 0; padding: 0; position: relative; }
.outputs::before { content: ""; position: absolute; left: 47px; top: 18px; bottom: 18px; width: 2px;
  background: repeating-linear-gradient(180deg, var(--cyan) 0 6px, transparent 6px 14px); background-size: 2px 28px;
  opacity: .6; animation: flowdown 1.2s linear infinite; }
@keyframes flowdown { to { background-position: 0 28px; } }
.outputs li { position: relative; display: flex; gap: 18px; align-items: flex-start; padding: 12px 0; }
.fmt { flex: 0 0 96px; text-align: center; font-size: .74rem; padding: 5px 0; border-radius: 6px; position: relative; z-index: 1;
  background: var(--panel2); border: 1px solid var(--line); color: var(--cyan); transition: transform .2s, border-color .2s; }
.outputs li:hover .fmt { transform: translateX(4px); border-color: var(--cyan); }
.outputs p { margin: 0; color: var(--muted); font-size: .92rem; }
.outputs li { animation: rise .7s ease-out both; }
.o2 { animation-delay: .1s !important; } .o3 { animation-delay: .2s !important; } .o4 { animation-delay: .3s !important; } .o5 { animation-delay: .4s !important; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* Footer */
footer::before { content: ""; display: block; border-top: 1px solid var(--line); margin-bottom: 28px; }
footer.wrap { margin-top: 96px; padding-bottom: 44px; color: var(--muted); }
.small { font-size: .85rem; }

/* Responsive */
@media (max-width: 900px) {
  .flow { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .path { white-space: normal; }
  .tags { justify-content: flex-start; max-width: none; }
}
@media (max-width: 600px) {
  nav a:not(:last-of-type) { display: none; }
  .oss { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
  .goals { grid-template-columns: 1fr; }
  .term pre { font-size: .7rem; }
}

/* Respect visitors who prefer less motion: show the final state. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .beam { display: none; }
  .ln, .t { opacity: 1; transform: none; }
  .cmd { width: 22ch; }
  .wire { stroke-dashoffset: 0; }
}

.note { max-width: 740px; margin: 26px 0 0; padding: 12px 16px; font-size: .95rem; color: var(--text);
  background: rgba(159,216,245,.08); border: 1px solid rgba(159,216,245,.35); border-left: 4px solid var(--accent); border-radius: 6px; }
.note strong { color: var(--accent); margin-right: 6px; }
.outputs li { align-items: center; padding: 10px 0; }
.outputs p { font-size: .95rem; }
.flow { margin-top: 20px; }
.sub.after { margin: 20px 0 0; }

/* Header version */
nav { display: flex; align-items: center; }
.version { margin-left: 22px; font: .78rem ui-monospace, Menlo, Consolas, monospace; color: var(--accent);
  border: 1px solid rgba(159,216,245,.45); background: rgba(159,216,245,.08); border-radius: 6px; padding: 3px 9px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.btn { display: inline-block; padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: .98rem;
  color: var(--text); border: 1px solid var(--line); background: rgba(255,255,255,.03); transition: border-color .2s, transform .2s; }
.btn:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #062018; }

/* Goals */
.goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 80px; }
.goals h3 { font-size: 1.12rem; margin-bottom: 8px; }
.goals p { margin: 0; color: var(--muted); font-size: .96rem; }
.goals.fit { margin-top: 0; }

/* How it works diagram */
.diagram { margin: 24px 0 18px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: rgba(4,17,12,.6); overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 640px; height: auto; }
.node rect { fill: var(--panel2); stroke: var(--line); stroke-width: 1.5; }
.node.core rect { fill: rgba(159,216,245,.07); stroke: var(--accent); stroke-width: 2; }
.node.ext rect { stroke-dasharray: 5 4; }
.node text { text-anchor: middle; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.node .name { fill: var(--text); font-size: 15px; font-weight: 700; }
.node .name.big { font: 700 18px ui-monospace, Menlo, Consolas, monospace; fill: var(--accent); }
.node .hint { fill: var(--muted); font-size: 12px; }
.node .item { fill: var(--text); font: 14px ui-monospace, Menlo, Consolas, monospace; text-anchor: start; }
.edge { fill: var(--muted); font: 12px ui-monospace, Menlo, Consolas, monospace; }
.wire { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 7; opacity: .75; animation: wire 1.4s linear infinite; }
.wire.both { animation-duration: 2.2s; animation-direction: alternate; }
@keyframes wire { to { stroke-dashoffset: -26; } }

/* Open source */
.oss { display: flex; gap: 32px; align-items: center; justify-content: space-between; margin-top: 96px;
  padding: 36px 40px; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(135deg, rgba(159,216,245,.07), rgba(20,110,70,.10)); }
.oss h2 { margin-top: 0; }
.oss p { max-width: 680px; color: var(--muted); }
.oss .btn { flex: 0 0 auto; }
