/* podbag.dev: one stylesheet for every language. */
:root {
  color-scheme: light dark;
  --podbag: light-dark(#8853b4, #b88ae0);
  --docker: light-dark(#187bbe, #42a6ec);
  --page: light-dark(#f9f9f7, #0d0d0d);
  --surface: light-dark(#ffffff, #1a1a19);
  --ink: light-dark(#0b0b0b, #f0efec);
  --ink-2: light-dark(#52514e, #c3c2b7);
  --muted: #898781;
  --line: light-dark(#e1e0d9, #2c2c2a);
  --accent: light-dark(#2a78d6, #3987e5);
  --code-bg: light-dark(#f2f1ed, #242422);
  --glow: light-dark(rgb(42 120 214 / 0.16), rgb(57 135 229 / 0.2));
  --dot: light-dark(rgb(11 11 11 / 0.07), rgb(240 239 236 / 0.07));
  --again: light-dark(#c2410c, #fb923c);
  --once: light-dark(#15803d, #4ade80);
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
:lang(ko) { --sans: ui-sans-serif, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
:lang(ja) { --sans: ui-sans-serif, -apple-system, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif; }
:lang(zh-CN) { --sans: ui-sans-serif, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
:lang(ko) body { word-break: keep-all; overflow-wrap: break-word; }
:lang(ja) body { line-break: strict; }
:lang(ja) :is(h1, h2, h3, .lead) { word-break: auto-phrase; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 16px; z-index: 30; background: var(--surface); padding: 6px 10px; border-radius: 6px; }
code { font: 0.92em var(--mono); background: var(--code-bg); padding: 1px 5px; border-radius: 5px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--page) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
nav { display: flex; align-items: center; gap: 18px; height: 56px; }
nav .brand {
  display: flex; align-items: center; gap: 8px; margin-right: auto;
  font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none;
}
nav a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); text-decoration: none; font-size: 15px; white-space: nowrap;
}
nav a:hover { color: var(--ink); }
nav .icon { flex: none; }
.theme-picker:not([hidden]) {
  display: inline-flex; flex: none; padding: 2px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--code-bg);
}
.theme-picker button {
  display: grid; place-items: center; width: 30px; height: 28px; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); cursor: pointer;
}
.theme-picker button:hover { color: var(--ink); }
.theme-picker button[aria-pressed="true"] {
  background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgb(0 0 0 / 0.18);
}
.lang-button {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: 14px var(--sans); color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px;
}
.lang-button:hover { color: var(--ink); }
#langs {
  position: fixed; inset: 60px 16px auto auto; margin: 0; padding: 6px;
  min-width: 180px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); box-shadow: 0 16px 40px rgb(0 0 0 / 0.18);
}
#langs a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
#langs a:hover, #langs a:focus-visible { background: var(--code-bg); }
#langs a[aria-current="page"] { font-weight: 700; color: var(--accent); }
nav a[aria-current="true"] { color: var(--ink); font-weight: 600; }
/* Narrow screens: the menu shows its icons; their labels still name the links. */
@media (max-width: 760px) {
  nav { gap: 16px; }
  nav .label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
}
/* Small phones: the language button shows only its globe; its label names it. */
@media (max-width: 430px) {
  .top nav { gap: clamp(4px, 2vw, 8px); }
  .lang-button { padding: 5px; }
  .lang-button span { display: none; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.hero::after {
  content: ""; position: absolute; top: -30%; right: -12%; width: 680px; height: 680px;
  background: radial-gradient(circle, var(--glow), transparent 64%); pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.logo { display: block; width: 88px; height: 88px; }
.float { animation: float 4.5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-3deg); } }
.eyebrow { margin: 14px 0 6px; color: var(--accent); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.hero h1 { font-size: clamp(34px, 5.2vw, 54px); line-height: 1.08; margin: 0 0 16px; letter-spacing: -0.02em; }
.lead { font-size: 18.5px; color: var(--ink-2); margin: 0 0 24px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.button {
  display: inline-block; padding: 10px 18px; border-radius: 9px; font-weight: 600;
  text-decoration: none; border: 1px solid var(--line); color: var(--ink); background: var(--surface);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgb(0 0 0 / 0.12); }
.cta .button { display: inline-grid; place-items: center; width: 48px; height: 44px; padding: 0; }
.facts {
  position: relative; min-width: 0; padding: 0; border: 0; margin: 30px 0 0;
}
.facts-grid { display: grid; grid-template-columns: repeat(var(--columns, 4), minmax(0, 1fr)); gap: 8px; }
.facts label, .comparison-table summary {
  border: 1px solid var(--muted); background: var(--surface); cursor: pointer;
}
.facts label { padding: 8px 9px; border-radius: 14px; overflow-wrap: anywhere; }
@media (hover: hover) {
  .facts label:hover, .comparison-table summary:hover { border-color: var(--ink-2); background: var(--code-bg); }
}
.facts input:checked + label {
  border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.facts input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.facts b { display: block; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.facts label > span { display: block; color: var(--ink-2); font-size: 13.5px; line-height: 1.35; margin-top: 4px; }
@media (max-width: 560px) { .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fact-result { display: none; order: 1; grid-column: 1 / -1; }
.fact-result, .comparison-card {
  min-width: 0; margin: 6px 0 0; padding: 13px 14px 15px;
  border-radius: 12px; background: var(--surface);
}
.facts input:checked + label + .fact-result { display: block; }
.fact-result figcaption {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 0 0 11px; font-size: 12px; line-height: 1.45; color: var(--ink-2);
}
.comparisons { margin: 20px 0; }
.comparisons label { align-content: center; font-weight: 600; font-size: 14px; line-height: 1.4; }
.comparison-card figcaption { margin-bottom: 12px; font-weight: 600; }
.comparison-card figcaption small { display: block; color: var(--ink-2); font-weight: 400; }
.comparisons .fact-series, .comparison-card .fact-series { grid-template-columns: minmax(100px, 1fr) minmax(12px, 2.8fr) auto; column-gap: 8px; }
.fact-brand span { min-width: 0; overflow-wrap: anywhere; }
.fact-brand img { flex: none; }
.fact-result a { flex: none; color: inherit; text-underline-offset: 3px; }
.fact-series {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 8px 12px; font-size: 13px;
}
.fact-brand { display: inline-flex; gap: 7px; align-items: center; font-weight: 600; }
.fact-brand img { object-fit: contain; }
.fact-brand small { display: block; font-size: 11px; font-weight: 400; line-height: 1.1; color: var(--ink-2); }
.fact-series strong { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fact-track { height: 8px; background: var(--code-bg); border-radius: 4px; }
.fact-bar { display: block; height: 100%; border-radius: inherit; transform-origin: left; }
.podbag-bar { background: var(--podbag); }
.docker-bar { background: var(--docker); }
.podman-bar { background: light-dark(#6154ae, #a79be9); }
.kiri-bar { background: var(--ink-2); }
.orbstack-bar { background: light-dark(#217c68, #60bfa6); }
.colima-bar { background: light-dark(#a46724, #e4a663); }
@media (prefers-reduced-motion: no-preference) {
  .facts.in .fact-bar, .comparison-card.in .fact-bar { animation: fact-grow 850ms cubic-bezier(.22,.68,.15,1) both; }
  @keyframes fact-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* The terminal */
.term {
  background: #101114; color: #e8e6e3; border-radius: 14px; overflow: hidden;
  border: 1px solid #262a31; box-shadow: 0 24px 60px rgb(0 0 0 / 0.3);
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 12px; background: #181b21; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ec6a5e; }
.term-bar i:nth-child(2) { background: #f4bf4f; }
.term-bar i:nth-child(3) { background: #61c554; }
.term-bar span { margin-left: 8px; color: #8b8f98; font-size: 12px; }
.term-body {
  display: grid; margin: 0; padding: 16px 18px 20px;
  font: 13.5px/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
}
.term-body > code { grid-area: 1 / 1; font: inherit; background: none; padding: 0; color: inherit; }
.term.typing .full { visibility: hidden; }
.term .p { color: #6fb3ff; }
.term .o { color: #d6d4cf; }
.term .m { color: #8b8f98; }
.caret {
  display: inline-block; width: 0.6em; height: 1.15em; margin-bottom: -0.2em;
  background: #e8e6e3; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Sections */
section.block { padding: 64px 0; border-top: 1px solid var(--line); }
section.block h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 8px; letter-spacing: -0.01em; }
p.sub { color: var(--ink-2); margin: 0 0 26px; font-size: 17px; }
h3 { font-size: 18px; margin: 26px 0 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgb(0 0 0 / 0.1); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card b { display: block; margin-bottom: 4px; }
.card span { color: var(--ink-2); font-size: 15px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.panel h3 { margin: 0 0 2px; }
.panel .tag { color: var(--ink-2); font-size: 13.5px; margin: 0 0 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.note { color: var(--ink-2); font-size: 15px; }
ul.points { padding-left: 20px; }
ul.points li { margin: 6px 0; }

/* Reveal on scroll, only when scripts run */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--d, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* What stays running */
.plist { position: relative; min-height: 216px; }
.proc {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin: 0 0 8px;
  border-radius: 9px; background: var(--code-bg); font: 14px var(--mono);
}
.proc em { margin-left: auto; font: 12.5px var(--sans); font-style: normal; color: var(--ink-2); text-align: right; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.always .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent); } }
.idle {
  position: absolute; inset: 0 0 8px; display: flex; align-items: center; justify-content: center;
  color: var(--ink-2); font-size: 15px; border: 1px dashed var(--line); border-radius: 10px;
}
.ctrs { display: flex; gap: 6px; flex-wrap: wrap; min-height: 30px; margin-top: 4px; }
.ctr { padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--page); font: 13px var(--mono); }
.rest { margin: 14px 0 0; font-size: 14.5px; color: var(--ink-2); }
.rest b { color: var(--ink); }
.caps { position: relative; min-height: 52px; margin-top: 18px; text-align: center; font-weight: 600; }
.cap { position: absolute; inset: 0; opacity: 0; }
.procs .run, .procs .keeper, .procs .idle, .procs .cap { animation-duration: 10s; animation-iteration-count: infinite; animation-play-state: paused; }
.procs.play .run, .procs.play .keeper, .procs.play .idle, .procs.play .cap { animation-play-state: running; }
.procs .run { animation-name: life-run; }
.procs .r2 { animation-delay: 0.15s; }
.procs .r3 { animation-delay: 0.3s; }
.procs .keeper { animation-name: life-keeper; }
.procs .idle { animation-name: life-idle; }
.procs .cap1 { animation-name: cap1; }
.procs .cap2 { animation-name: cap2; }
.procs .cap3 { animation-name: cap3; }
.procs .cap4 { animation-name: cap4; }
@keyframes life-run { 0%, 15% { opacity: 0; transform: translateY(6px); } 20%, 55% { opacity: 1; transform: none; } 60%, 100% { opacity: 0; transform: translateY(6px); } }
@keyframes life-keeper { 0%, 17% { opacity: 0; } 22%, 78% { opacity: 1; } 83%, 100% { opacity: 0; } }
@keyframes life-idle { 0%, 13% { opacity: 1; } 17%, 82% { opacity: 0; } 86%, 100% { opacity: 1; } }
@keyframes cap1 { 0%, 13% { opacity: 1; } 16%, 100% { opacity: 0; } }
@keyframes cap2 { 0%, 17% { opacity: 0; } 20%, 54% { opacity: 1; } 57%, 100% { opacity: 0; } }
@keyframes cap3 { 0%, 57% { opacity: 0; } 60%, 81% { opacity: 1; } 84%, 100% { opacity: 0; } }
@keyframes cap4 { 0%, 84% { opacity: 0; } 87%, 100% { opacity: 1; } }

/* Layers and files */
.storage { margin: 0 0 18px; }
.storage img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.memory { margin-top: 26px; }
.memory h3 { margin-top: 0; }

/* Product marks in the comparison matrix and process diagram. */
.tool { flex: none; width: 20px; height: 20px; object-fit: contain; }
.tool-head { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tool.on-light, .logo-colima { background: light-dark(transparent, #f4f4f2); border-radius: 4px; padding: 1px; }
.engine-podbag { --engine-color: var(--podbag); }
.engine-docker { --engine-color: var(--docker); }
.procs .panel { border-top: 3px solid var(--engine-color); }
.procs .dot { background: var(--engine-color); }
#compare .table-wrap { border: 1px solid var(--line); border-radius: 12px; }
#compare table { border-style: hidden; }
#compare th[scope="row"] { background: var(--surface); color: var(--ink-2); font-weight: 500; }
@media (max-width: 760px) {
  #compare th[scope="row"] { position: sticky; left: 0; }
}

/* Install, use, tables */
.code { position: relative; background: var(--code-bg); border-radius: 10px; margin: 10px 0 14px; }
.code pre { margin: 0; padding: 14px 16px; padding-right: 76px; overflow-x: auto; font: 14px/1.6 var(--mono); }
.code pre code { background: none; padding: 0; font-size: inherit; }
.code button {
  position: absolute; top: 8px; right: 8px; cursor: pointer;
  font: 13px var(--sans); color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px;
}
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--surface); }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--code-bg); font-weight: 600; }
td:first-child { color: var(--ink-2); }
.diagram img, .intro img { display: block; width: 100%; height: auto; border-radius: 14px; }
.diagram { margin-top: 18px; }

footer { border-top: 1px solid var(--line); padding: 32px 0 56px; color: var(--ink-2); font-size: 15px; }
footer p { margin: 6px 0; }
footer .langs a { white-space: nowrap; }

/* Less motion: every animation shows its end. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float, .caret, .always .dot { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .procs .run, .procs .keeper, .procs .idle, .procs .cap { animation: none; }
  .procs .run, .procs .keeper, .procs .cap2 { opacity: 1; }
  .procs .idle { opacity: 0; }
  .button, .card { transition: none; }
}
@media print {
  .js .reveal { opacity: 1; transform: none; }
  .facts .facts-grid { display: block; }
  .facts .fact-result { display: block; break-inside: avoid; }
  .facts .facts-grid label { display: block; margin-top: 8px; }
  .facts .fact-bar, .comparison-card .fact-bar { animation: none; }
  .top, .term { display: none; }
}
