@font-face {
  font-family: "Bricolage";
  src: url("fonts/BricolageGrotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

/* Dark is the default. Light is chosen with the toggle in the header. */
:root {
  color-scheme: dark;
  --bg: #161513;
  --surface: #201E1C;
  --fg: #EFEBE2;
  --fg2: #ADA79B;
  --line: rgba(239, 235, 226, .13);
  --line-strong: rgba(239, 235, 226, .34);
  --code: rgba(239, 235, 226, .09);
  --plate: rgba(239, 235, 226, .045);
  --accent: #E9B96E;
  --btn-bg: #EFEBE2;
  --btn-fg: #131211;
  --btn-hover: #FFFFFF;
  --sans: "Bricolage", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --wrap: 1180px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --radius: 10px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F3F1EB;
  --surface: #E9E6DD;
  --fg: #171614;
  --fg2: #57544D;
  --line: rgba(23, 22, 20, .14);
  --line-strong: rgba(23, 22, 20, .38);
  --code: rgba(23, 22, 20, .07);
  --plate: rgba(23, 22, 20, .05);
  --accent: #9A520C;
  --btn-bg: #171614;
  --btn-fg: #F3F1EB;
  --btn-hover: #3A3732;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.theme-fade, .theme-fade * , .theme-fade *::before, .theme-fade *::after {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease !important;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, figure, dl, dd { margin: 0; }
ol { padding: 0; list-style: none; }
code, kbd { font-family: var(--mono); font-size: .86em; }
.nowrap { white-space: nowrap; }
code { background: var(--code); padding: .1em .38em; border-radius: 4px; overflow-wrap: anywhere; }
kbd {
  display: inline-block;
  padding: .02em .42em .08em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  font-size: .78em;
  line-height: 1.3;
}
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--line-strong); outline-offset: 3px; border-radius: 4px; }
.hash-btn:focus, .hash-btn:focus-visible, .theme-btn:focus, .theme-btn:focus-visible { outline: none; }
.hash-btn:focus-visible, .theme-btn:focus-visible { border-color: var(--fg); }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 20;
  background: var(--btn-bg); color: var(--btn-fg); padding: 10px 16px; font-weight: 600; border-radius: 6px;
}
.skip:focus { top: 12px; }

/* Type */
h1, h2 {
  font-weight: 800;
  font-stretch: 78%;
  letter-spacing: .004em;
  text-wrap: balance;
}
h1 { font-size: clamp(3.6rem, 10.4vw, 9rem); line-height: .88; }
h2 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); line-height: .96; }
h3 { font-size: 1.28rem; font-weight: 650; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; gap: 28px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 0 0 1px var(--line); }
.head-nav { display: flex; gap: 28px; margin-left: auto; }
.head-nav a { font-size: .95rem; font-weight: 500; color: var(--fg2); padding: 6px 0; border-bottom: 1.5px solid transparent; transition: color .2s ease, border-color .2s ease; }
.head-nav a:hover { color: var(--fg); }
.head-nav a[aria-current] { color: var(--fg); border-color: var(--accent); }
.head-actions { display: flex; align-items: center; gap: 10px; }
.theme-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: none; color: var(--fg); cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
.theme-btn:hover { background: var(--code); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: block; }
:root[data-theme="light"] .theme-btn .i-moon { display: none; }
.head-dl {
  font-weight: 650; font-size: .92rem;
  padding: 9px 16px; border-radius: 8px;
  background: var(--btn-bg); color: var(--btn-fg);
  transition: background-color .2s ease;
}
.head-dl:hover { background: var(--btn-hover); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 80px);
}
.lede { margin-top: 28px; max-width: 40ch; color: var(--fg2); font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; text-wrap: pretty; }
.hero-mark img { width: 100%; height: auto; max-width: 420px; margin-inline: auto 0; aspect-ratio: 1; border-radius: 14%; box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 14px var(--plate); }

/* The installer, shown the way Windows shows a file */
.file {
  margin-top: 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap;
  padding: 16px 16px 16px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  max-width: 660px;
}
.file-name { font: 400 1rem/1.3 var(--mono); overflow-wrap: anywhere; }
.file-meta { margin-top: 4px; color: var(--fg2); font-size: .9rem; }
.file-note { margin-top: 12px; color: var(--fg2); font-size: .9rem; }

.btn {
  display: inline-block;
  padding: 14px 24px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 650; font-size: 1rem;
  border-radius: 9px;
  transition: background-color .2s ease, transform .2s var(--ease);
}
.btn:hover { background: var(--btn-hover); }
.btn:active { transform: scale(.98); }
.btn.is-sent { animation: sent .6s var(--ease); }
@keyframes sent { 40% { transform: scale(.96); } }

/* Hero entrance: the one orchestrated moment */
@keyframes rise { from { opacity: 0; translate: 0 24px; } }
@keyframes settle { from { opacity: 0; translate: 40px 0; } }
.hero h1 { animation: rise .9s var(--ease) both; }
.hero .lede, .hero .file, .hero .file-note { animation: rise .9s var(--ease) .15s both; }
.hero-mark { animation: settle 1s var(--ease) .1s both; }

/* Statement */
.statement {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(80px, 11vw, 150px);
}
.statement-body { display: grid; gap: 20px; align-content: start; padding-top: .5em; }
.statement-body p { font-size: 1.12rem; max-width: 56ch; }
.statement-body p + p { color: var(--fg2); }

/* Features */
.features { padding-bottom: clamp(80px, 11vw, 150px); }
.section-sub { margin-top: 16px; color: var(--fg2); max-width: 46ch; }
.feature-grid {
  margin-top: 48px;
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: clamp(32px, 6vw, 96px);
  border-top: 1px solid var(--line-strong);
}
.feature-grid article { padding: 26px 0 30px; border-bottom: 1px solid var(--line); }
.feature-grid p { margin-top: 8px; color: var(--fg2); font-size: .98rem; max-width: 52ch; }

/* Mechanism: this one really is a sequence, so it is numbered */
.mechanism { background: var(--surface); }
.mech-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(36px, 7vw, 110px); padding-block: clamp(72px, 10vw, 130px); }
.mech-intro p { margin-top: 22px; color: var(--fg2); max-width: 36ch; }
.steps li { display: grid; grid-template-columns: clamp(56px, 8vw, 96px) 1fr; gap: 12px; padding: 24px 0 28px; border-top: 1px solid var(--line); }
.steps li:first-child { border-top-color: var(--line-strong); }
.step-n { font-weight: 800; font-stretch: 78%; font-size: clamp(3.4rem, 6vw, 5.4rem); line-height: .8; color: var(--accent); }
.steps p { margin-top: 8px; color: var(--fg2); font-size: .98rem; max-width: 50ch; }

/* Requirements */
.requirements { padding-block: clamp(80px, 10vw, 130px); }
.req-list { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 6vw, 96px); border-top: 1px solid var(--line-strong); }
.req-list div { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.req-list dt { font-weight: 700; }
.req-list dd { color: var(--fg2); }
.caveat { margin-top: 40px; padding: 20px 24px; background: var(--surface); border-left: 4px solid var(--accent); border-radius: 4px 12px 12px 4px; max-width: 70ch; font-size: .98rem; color: var(--fg2); }
.caveat strong { color: var(--fg); }

/* FAQ */
.questions { padding-bottom: clamp(80px, 11vw, 150px); }
.faq { margin-top: 40px; border-top: 1px solid var(--line-strong); max-width: 880px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 20px 0; cursor: pointer; list-style: none;
  font-size: 1.12rem; font-weight: 600;
  transition: color .2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: 0 0 auto; width: 14px; height: 14px;
  background:
    linear-gradient(var(--fg), var(--fg)) center / 14px 2px no-repeat,
    linear-gradient(var(--fg), var(--fg)) center / 2px 14px no-repeat;
  transition: transform .35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq summary:hover { color: var(--accent); }
.faq p { padding: 0 40px 24px 0; color: var(--fg2); max-width: 66ch; }
.faq { interpolate-size: allow-keywords; }
@supports selector(::details-content) {
  .faq details::details-content { height: 0; overflow: clip; transition: height .35s var(--ease), content-visibility .35s allow-discrete; }
  .faq details[open]::details-content { height: auto; }
}

/* Developer */
.developer { padding-bottom: clamp(64px, 9vw, 112px); }
.dev-grid {
  margin-top: 40px;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 80px);
  padding-top: 32px; border-top: 1px solid var(--line-strong);
}
.dev-card { display: flex; align-items: center; gap: 16px; align-self: start; }
.dev-card img { border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.dev-name { font-weight: 700; font-size: 1.15rem; }
.dev-handle { margin-top: 2px; color: var(--fg2); font: 400 .9rem/1.4 var(--mono); }
.dev-body p { color: var(--fg2); max-width: 52ch; }
.dev-body strong { color: var(--fg); }
.dev-links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 18px; }
.dev-links a { color: var(--fg); font-weight: 600; border-bottom: 1.5px solid var(--accent); padding-bottom: 1px; transition: color .2s ease; }
.dev-links a:hover { color: var(--accent); }

/* Close */
.close { padding-bottom: clamp(64px, 9vw, 112px); }
.close-grid {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 28px 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(32px, 6vw, 72px);
}
.close h2 { font-size: clamp(2.6rem, 6vw, 5rem); }
.close-sub { margin-top: 16px; color: var(--fg2); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; padding-block: 44px 36px; }
.foot-brand { display: flex; gap: 14px; align-items: center; }
.foot-brand img { border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.foot-name { font-weight: 700; }
.foot-ver { margin-top: 2px; font-size: .85rem; color: var(--fg2); }
.site-foot nav { display: flex; gap: 12px 28px; flex-wrap: wrap; font-size: .93rem; }
.site-foot nav a { color: var(--fg2); transition: color .2s ease; }
.site-foot nav a:hover { color: var(--fg); }
.foot-bottom {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap;
  padding-block: 28px 52px; border-top: 1px solid var(--line);
}
.foot-legal { max-width: 34ch; color: var(--fg2); font-size: .88rem; line-height: 1.5; }
.hash-btn {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; row-gap: 6px; align-items: baseline;
  width: min(100%, 520px);
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: none; color: var(--fg2);
  font: 400 .76rem/1.4 var(--mono); text-align: left; cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.hash-btn:hover { border-color: var(--line-strong); }
.hash-label { grid-column: 1; grid-row: 1; font-family: var(--sans); font-size: .85rem; }
.hash-btn .hash { grid-column: 1 / -1; grid-row: 2; overflow-wrap: anywhere; color: var(--fg); }
.hash-copy { grid-column: 2; grid-row: 1; font-family: var(--sans); font-size: .85rem; color: var(--fg); }
.hash-btn.is-done .hash-copy { color: var(--accent); }

/* 404 */
.not-found { min-height: 70vh; display: grid; align-content: center; padding-block: 80px; }
.not-found-action { margin-top: 32px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-mark { order: -1; }
  .hero-mark { padding: 8px 0 0 8px; }
  .hero-mark img { width: 120px; max-width: 120px; margin-inline: 0; border-radius: 16%; box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 8px var(--plate); }
  .statement, .mech-grid, .dev-grid { grid-template-columns: 1fr; }
  .close-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .wrap { width: min(var(--wrap), 100% - 36px); }
  .head-nav { display: none; }
  .head-row { justify-content: space-between; }
  .feature-grid, .req-list { grid-template-columns: 1fr; }
  .req-list div { grid-template-columns: 96px 1fr; }
  .file { flex-direction: column; align-items: stretch; padding: 18px; }
  .btn { text-align: center; }
  .close-grid { border-radius: 18px; }
}

@media (max-width: 400px) {
  .head-row { gap: 12px; }
  .brand { gap: 9px; font-size: 1rem; }
  .head-actions { gap: 8px; }
  .head-dl { padding: 9px 13px; }
}
