@font-face {
  font-family: "Bricolage Grotesque";
  src: url("./assets/bricolage-grotesque.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f3eb;
  --ink: #251c18;
  --muted: #675c53;
  --line: #ded4c7;
  --rust: #9b3923;
  --dark: #2c1c17;
  --ease: cubic-bezier(.22,.79,.24,1);
  font-family: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min( calc(100% - clamp(42px, 10vw, 176px)), 1320px); margin-inline: auto; }
.header, .footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.header { min-height: 87px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; font-weight: 770; font-size: 20px; letter-spacing: -.035em; white-space: nowrap; }
.brand img { margin-right: 11px; border-radius: 9px; }
.brand span { font-weight: 510; margin-left: .24em; }
.github { display: inline-flex; align-items: center; gap: 8px; font-weight: 640; font-size: 14px; border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; transition: background .2s; }
.github:hover { background: #ebe2d6; }
.github span, .footer a span { color: var(--muted); }
.hero { flex: 1; display: grid; grid-template-columns: minmax(0,.91fr) minmax(0,1.09fr); gap: clamp(24px,5vw,84px); align-items: center; padding-block: clamp(40px,6.6vh,80px); }
.intro { padding-block: 10px; }
h1 { font-size: clamp(56px,7.4vw,111px); font-weight: 735; font-variation-settings: "opsz" 96; line-height: .94; letter-spacing: -.064em; word-spacing: .055em; margin: 0; }
.title-line { display: block; padding: .03em .08em .13em .025em; margin: -.03em -.08em -.10em -.025em; overflow: clip; }
.title-line > span { display: block; animation: type-in .86s var(--ease) both; }
.title-line.accent { color: var(--rust); font-weight: 540; }
.title-line.accent > span { animation-delay: .10s; }
.lede { margin: 33px 0 0; color: var(--muted); font-size: clamp(17px,1.45vw,21px); line-height: 1.48; max-width: 34ch; animation-delay: .22s !important; }
.actions { margin-top: 32px; animation-delay: .30s !important; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 14px; min-height: 52px; padding: 12px 18px; border-radius: 9px; border: 1px solid transparent; font-weight: 730; font-size: 15px; line-height: 1.2; transition: background .22s, color .22s, border-color .22s; }
.primary { color: var(--paper); background: var(--dark); }
.primary:hover { background: var(--rust); }
.primary svg { transition: transform .26s var(--ease); }
.primary:hover svg { transform: translateY(2px); }
.platforms { display: flex; gap: 19px; align-items: center; padding: 0; margin: 19px 0 0 2px; color: #716259; list-style: none; }
.os-icon { display: inline-grid; place-items: center; width: 17px; height: 19px; flex: none; }
.os-icon svg { width: 100%; height: 100%; fill: currentColor; }
.art { margin: 0; position: relative; isolation: isolate; overflow: hidden; border-radius: 12px; background: #311d16; aspect-ratio: 1.06; animation: art-in 1s var(--ease) both; }
.art.launcher-preview { background: #000; aspect-ratio: auto; }
.launcher-preview img { display: block; width: 100%; height: auto; }
.art-frame { position: absolute; z-index: 1; inset: 25px; border: 1px solid #ecc4a124; pointer-events: none; }
.footer { min-height: 67px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer a:hover, .text-link:hover { color: var(--rust); text-decoration: underline; text-underline-offset: 4px; }
.rise { animation: rise .66s var(--ease) both; }
@keyframes type-in { from { transform: translateY(106%); } to { transform: translateY(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes art-in { from { opacity: .45; clip-path: inset(8% 9% 8% 9% round 24px); } to { opacity: 1; clip-path: inset(0 round 12px); } }

body:has(dialog[open]) { overflow: hidden; }
dialog { position: fixed; inset: 0; padding: 0; width: min(516px, calc(100% - 28px)); max-width: none; max-height: calc(100dvh - 28px); background: var(--paper); color: var(--ink); border: 1px solid #d6c8b8; border-radius: 20px; overflow: auto; }
dialog::backdrop { background: rgb(29 19 15 / .57); animation: shade .28s both; }
@keyframes shade { from { opacity: 0; } to { opacity: 1; } }
.wizard-inner { padding: clamp(20px,5vw,33px); }
.wizard-head { display: flex; justify-content: space-between; align-items: center; }
.step { color: var(--rust); font-weight: 740; font-size: 13px; }
.icon-button { color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 9px; width: 38px; height: 38px; font-size: 23px; line-height: 1; }
.icon-button:hover { background: #ebe2d6; }
dialog h2 { font-size: clamp(29px,5.4vw,42px); letter-spacing: -.055em; line-height: 1.05; margin: 12px 0 9px; }
dialog h2:focus { outline: none; }
.wizard-description { color: var(--muted); font-size: 15px; line-height: 1.45; margin: 0 0 19px; }
.wizard-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 11px 0 17px; }
.wizard-progress span { height: 3px; border-radius: 2px; background: var(--line); transition: background .25s; }
.wizard-progress .is-filled { background: var(--rust); }
.picker-label { display: block; font-size: 13px; font-weight: 720; margin-bottom: 7px; }
.picker-toggle { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; width: 100%; min-height: 49px; padding: 10px 13px; color: var(--ink); background: #fcf9f2; border: 1px solid var(--line); border-radius: 9px; font-weight: 650; transition: border-color .2s, background .2s; }
.picker-toggle:hover, .picker-toggle[aria-expanded="true"] { border-color: var(--rust); }
.picker-toggle.is-placeholder { color: var(--muted); font-weight: 520; }
.picker-toggle > svg { flex: none; transition: transform .23s var(--ease); }
.picker-toggle[aria-expanded="true"] > svg { transform: rotate(180deg); }
#picker-current { display: flex; align-items: center; gap: 10px; min-width: 0; }
.picker-reveal { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .32s var(--ease), opacity .22s var(--ease); }
.picker-toggle[aria-expanded="true"] + .picker-reveal { grid-template-rows: 1fr; opacity: 1; }
.picker-clip { min-height: 0; overflow: hidden; }
.picker-options { display: grid; gap: 2px; padding: 4px; margin-top: 5px; max-height: 216px; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; background: #fcf9f2; }
.picker-option { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 9px; text-align: left; background: transparent; color: var(--ink); border: 0; border-radius: 5px; font-weight: 640; }
.picker-option:hover, .picker-option:focus-visible { background: #f0e8dc; }
.picker-option:focus-visible { outline-offset: -2px; }
.picker-option[aria-selected="true"] { color: var(--rust); background: #f0e1d5; }
.picker-option[aria-selected="true"]::after { content: '✓'; flex: none; margin-left: auto; }
.picker-option-text { min-width: 0; overflow-wrap: anywhere; }
.picker-option-text small { display: block; font-weight: 460; font-size: 12px; color: var(--muted); margin-top: 3px; }
.picker-tag { flex: none; border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; color: var(--rust); font-size: 11px; font-weight: 750; }
.wizard-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.wizard-actions .primary { flex: 1; }
.secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.secondary:hover { background: #ebe2d6; }
button:disabled { cursor: default; background: #e6ddd1; color: #6c6158; }
.file-note { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.wizard-note { padding: 13px 15px; margin-top: 15px; background: #eee5da; border-radius: 9px; line-height: 1.44; font-size: 14px; }
.wizard-note p { margin: 5px 0 0; }
.wizard-note code { display: block; margin-top: 9px; overflow-wrap: anywhere; font-size: 12px; }
.copy { border: 1px solid #cbbbac; background: transparent; color: var(--ink); border-radius: 5px; padding: 3px 8px; margin-top: 7px; }
.text-link { display: inline-block; margin-top: 12px; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.error-page { flex: 1; display: grid; justify-items: center; align-content: center; gap: 24px; padding-block: clamp(28px,6vh,70px); }
.error-page .art { display: grid; place-items: center; width: min(100%, 630px); aspect-ratio: 1.65; color: #e9aa86; font-size: clamp(100px,24vw,230px); font-weight: 750; letter-spacing: -.1em; padding-right: .1em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 780px) {
  .header { min-height: 70px; }
  .hero { grid-template-columns: 1fr; gap: 31px; padding-top: 42px; padding-bottom: 28px; }
  h1 { font-size: clamp(60px,12.5vw,100px); }
  .art { aspect-ratio: 1.22; }
  .lede { margin-top: 21px; }
  .actions { margin-top: 24px; }
  .footer { min-height: 60px; }
}
@media (max-width: 370px) {
  .brand { font-size: 17px; }
  .brand img { width: 29px; height: 29px; margin-right: 7px; }
  .github { gap: 5px; padding-inline: 7px; }
  .art-frame { inset: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
.os-icon img { width: 100%; height: 100%; display: block; }
.platforms img { opacity: .65; }
.wizard-note details { margin-top: 8px; }
.wizard-note summary { cursor: pointer; font-weight: 660; }

.header-controls { display: flex; align-items: center; gap: 12px; }
.language-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; }
.language-switch [data-language] { display: inline-grid; place-items: center; padding: 5px 7px; min-height: 27px; color: var(--muted); font-size: 12px; font-weight: 720; border: 0; border-radius: 5px; background: transparent; }
.language-switch [data-language]:hover { background: #ebe2d6; color: var(--ink); }
.language-switch [aria-pressed="true"], .language-switch [aria-current="page"] { background: var(--dark); color: var(--paper); }
.github .github-text { color: inherit; white-space: nowrap; }
.github-text > span { margin-left: 4px; }

@media (max-width: 460px) {
  .header { gap: 8px; }
  .header-controls { gap: 7px; }
  .github { padding: 8px; }
  .github .github-text { display: none; }
}
