@font-face { font-family: "Bricolage"; src: url("/assets/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
:root {
  --paper: #f3f0e8; --card: #fbfaf6; --ink: #17160f; --ink-2: #57544a; --ink-3: #8a867a; --line: #dcd7ca; --line-2: #e8e4d9;
  --accent: #ff5a1f; --accent-ink: #fff; --code: #1d1c17; --code-ink: #ece7da; --focus: #2b59ff;
  --display: "Bricolage", ui-sans-serif, system-ui, sans-serif; --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --r: 14px; --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #12110d; --card: #1a1914; --ink: #efeadc; --ink-2: #b4ae9f; --ink-3: #7f7a6d; --line: #2f2d25; --line-2: #24221c; --code: #0b0a08; --code-ink: #e9e4d6; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--body); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 16px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 9; }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-2); }
.top .wrap { display: flex; align-items: center; gap: 22px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font: 700 21px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.brand svg { width: 26px; height: 26px; color: var(--accent); }
.top nav { display: flex; gap: 20px; margin-left: auto; align-items: center; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--ink-2); }
.top nav a:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer; transition: transform .16s var(--ease), background .16s; }
.btn:active { transform: scale(0.97); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; }
.top nav .btn { color: var(--paper); }

/* hero */
.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.eyebrow { font: 600 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 18px; }
h1 { font: 760 clamp(44px, 7vw, 88px)/0.95 var(--display); letter-spacing: -0.035em; margin: 0 0 22px; }
h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 19px; color: var(--ink-2); max-width: 34em; margin: 0 0 28px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.price-note { font-size: 14px; color: var(--ink-3); }
.stage { position: relative; aspect-ratio: 1; border-radius: 28px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.stage .big { color: var(--ink); width: 100%; display: flex; justify-content: center; margin-top: -24px; }
.stage .big svg { width: min(44%, 200px); height: auto; display: block; }
.stage .say { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; font: 600 20px/1.2 var(--display); letter-spacing: -0.01em; }
.stage .say b { color: var(--accent); font-weight: 700; }
.stage .dots { position: absolute; top: 20px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.stage .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background .2s; }
.stage .dots i.on { background: var(--ink); }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 8px 0 64px; }
.facts div { background: var(--card); padding: 18px 20px; }
.facts b { display: block; font: 700 26px/1.1 var(--display); letter-spacing: -0.02em; }
.facts span { font-size: 14px; color: var(--ink-2); }

/* library */
.lib-head { display: flex; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
h2 { font: 720 clamp(30px, 4vw, 44px)/1.05 var(--display); letter-spacing: -0.03em; margin: 0; }
.sub { color: var(--ink-2); margin: 8px 0 0; }
.search { margin-left: auto; position: relative; flex: 0 1 320px; }
.search input { width: 100%; height: 46px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 0 18px 0 44px; font: 16px var(--body); }
.search svg { position: absolute; left: 15px; top: 13px; width: 20px; height: 20px; color: var(--ink-3); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 500 14px var(--body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; aspect-ratio: 1; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .2s var(--ease); }
.card:hover { border-color: var(--ink-3); }
.card * { pointer-events: none; } /* the icon inside is swapped on first hover; clicks must still land on the card */
.card:active { transform: scale(0.97); }
.card .ic svg { width: 40px; height: 40px; display: block; }
.card .nm { font: 12.5px/1.2 var(--mono); color: var(--ink-3); max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card:hover .nm { color: var(--ink-2); }
.empty { padding: 40px; text-align: center; color: var(--ink-3); display: none; }

/* panel (dialog and icon pages) */
dialog.sheet { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: 22px; padding: 0; background: var(--paper); color: var(--ink); }
dialog.sheet::backdrop { background: rgba(10, 9, 6, .45); backdrop-filter: blur(2px); }
dialog.sheet[open] { animation: rise .26s var(--ease); }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.panel { display: grid; grid-template-columns: 360px 1fr; min-height: 520px; }
.panel .left { padding: 26px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.panel .right { padding: 26px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ptitle { display: flex; align-items: center; gap: 10px; }
.ptitle h3 { font: 700 26px/1.1 var(--display); letter-spacing: -0.02em; margin: 0; }
.ptitle .cat { font: 12px var(--mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.close { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.preview { aspect-ratio: 1; border-radius: 18px; border: 1px solid var(--line); display: grid; place-items: center; background: var(--card); cursor: pointer; position: relative; }
.preview.dark { background: #15140f; }
.preview svg { width: 52%; height: auto; display: block; }
.preview .hint { position: absolute; bottom: 10px; font: 12px var(--mono); color: var(--ink-3); }
.ctl { display: grid; grid-template-columns: 74px 1fr; gap: 10px 12px; align-items: center; font-size: 14px; }
.ctl label { color: var(--ink-2); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 500 13px var(--body); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ctl input[type=range] { width: 100%; accent-color: var(--accent); }
.ctl .val { font: 12px var(--mono); color: var(--ink-3); }
.row { display: flex; align-items: center; gap: 10px; }
input[type=color] { width: 38px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: none; padding: 2px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { height: 38px; padding: 0 12px; border: 0; background: none; color: var(--ink-3); font: 600 14px var(--body); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
pre.code { margin: 0; background: var(--code); color: var(--code-ink); border-radius: 14px; padding: 16px 18px; font: 12.5px/1.6 var(--mono); overflow: auto; max-height: 300px; white-space: pre-wrap; word-break: break-all; }
.codebar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.codebar .size { font: 12px var(--mono); color: var(--ink-3); margin-left: auto; }
.note { font-size: 13.5px; color: var(--ink-2); background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; }
.note b { color: var(--ink); }
.packline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; margin-top: auto; font-size: 14px; color: var(--ink-2); }
.packline .fmt { font: 12px var(--mono); border: 1px dashed var(--line); border-radius: 6px; padding: 3px 7px; }
.packline .btn { margin-left: auto; }

/* formats + pricing + faq */
section.band { padding: 80px 0 0; }
.formats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 26px; }
.fmtcard { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); padding: 18px; }
.fmtcard h4 { margin: 0 0 6px; font: 650 17px/1.2 var(--display); }
.fmtcard p { margin: 0; font-size: 14px; color: var(--ink-2); }
.fmtcard .tag { display: inline-block; margin-bottom: 10px; font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 5px 7px; border-radius: 5px; background: var(--line-2); color: var(--ink-2); }
.fmtcard .tag.pack { background: var(--accent); color: var(--accent-ink); }
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.price { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.price.main { border: 2px solid var(--ink); }
.price h3 { margin: 0; font: 700 20px/1.2 var(--display); }
.price .amt { font: 760 46px/1 var(--display); letter-spacing: -0.03em; }
.price .amt s { font-size: 22px; color: var(--ink-3); font-weight: 500; margin-left: 6px; }
.price .amt small { font: 500 15px var(--body); color: var(--ink-3); letter-spacing: 0; }
.price ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.price li { padding-left: 24px; position: relative; }
.price li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.price .btn { margin-top: auto; justify-content: center; }
.faq { margin-top: 26px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 16px 0; font: 600 18px/1.3 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--ink-3); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0 0 18px; color: var(--ink-2); max-width: 46em; }
footer { margin-top: 90px; border-top: 1px solid var(--line); padding: 30px 0 50px; color: var(--ink-3); font-size: 14px; }
footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--ink-2); }

/* icon pages, licence */
.page { padding: 40px 0 0; }
.crumbs { font: 13px var(--mono); color: var(--ink-3); margin-bottom: 16px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.page .panel { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.page .close { display: none; }
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(36px, 5vw, 56px); }
.prose h2 { font-size: 26px; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--ink-2); }
.prose pre { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font: 12px/1.5 var(--mono); white-space: pre-wrap; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .stage { max-width: 420px; }
  .facts, .formats { grid-template-columns: repeat(2, 1fr); }
  .prices { grid-template-columns: 1fr; }
  .panel { grid-template-columns: 1fr; }
  .panel .left { border-right: 0; border-bottom: 1px solid var(--line); }
  .preview { max-width: 300px; width: 100%; align-self: center; }
}
@media (max-width: 560px) {
  .top nav a:not(.btn) { display: none; }
  .wrap { padding: 0 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .search { flex-basis: 100%; }
  .facts { grid-template-columns: 1fr 1fr; }
  .formats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
