:root {
  --bg: #16120d;
  --bg2: #201a12;
  --panel: #241d14;
  --line: #3a2f20;
  --accent: #e3b254;
  --accent2: #b8862f;
  --text: #f0e8d8;
  --muted: #b3a68f;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: Georgia, serif; letter-spacing: .01em; }
a { color: var(--accent); }
code, kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; }
code { background: #0f0c08; padding: .1em .4em; border-radius: 4px; word-break: break-all; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .9em; }

/* hero */
.hero { position: relative; min-height: 78vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; background: #2a2015 center/cover no-repeat;
  filter: brightness(.55) saturate(1.1); transform: scale(1.03);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, rgba(22,18,13,.55) 45%, rgba(22,18,13,.15) 100%);
}
.hero-inner { position: relative; padding-top: 80px; padding-bottom: 56px; max-width: 800px; margin-left: max(20px, calc((100% - 1100px) / 2)); }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: .78em; margin: 0 0 8px; font-family: system-ui, sans-serif; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); margin: 0 0 14px; line-height: 1.05; color: #fff4dc; text-shadow: 0 2px 20px rgba(0,0,0,.6); }
.lead { font-size: 1.15em; max-width: 680px; margin: 0 0 26px; text-shadow: 0 1px 10px rgba(0,0,0,.7); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 6px;
  text-decoration: none; font-family: system-ui, sans-serif; font-weight: 600; border: 1px solid var(--accent2);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.btn-primary { background: linear-gradient(180deg, #f0c56a, var(--accent2)); color: #1a1208; }
.btn-ghost { background: rgba(22,18,13,.55); color: var(--text); border-color: var(--line); backdrop-filter: blur(4px); }
.btn-big { padding: 16px 26px; font-size: 1.1em; flex-wrap: wrap; }
.btn-size { font-weight: 400; opacity: .8; font-size: .9em; }
.btn-size:not(:empty)::before { content: "·"; margin-right: 10px; }

/* subnav */
.subnav { position: sticky; top: 0; z-index: 5; background: rgba(22,18,13,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.subnav .wrap { display: flex; gap: 4px; overflow-x: auto; }
.subnav a { padding: 12px 14px; color: var(--muted); text-decoration: none; font-family: system-ui, sans-serif; font-size: .92em; white-space: nowrap; }
.subnav a:hover { color: var(--accent); }

/* sections */
.section { padding: 56px 20px 8px; }
.section h2 { font-size: 1.9rem; margin: 0 0 6px; color: #fff4dc; }
.section h2::after { content: ""; display: block; width: 56px; height: 3px; background: var(--accent); margin-top: 10px; border-radius: 2px; }
.section > .muted { margin-top: 12px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 24px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.card h3 { margin: 0 0 10px; font-size: 1.2rem; color: var(--accent); }
.card ul { margin: 0; padding-left: 20px; }
.card li { margin: 6px 0; }
.card-plan { border-style: dashed; background: var(--bg2); }
.tag { display: inline-block; font: 600 .68rem system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; vertical-align: middle; margin-left: 6px; }

/* keys */
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 24px; margin-top: 22px; }
.keys div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.keys span { color: var(--muted); margin-left: auto; }
kbd { display: inline-block; padding: 2px 8px; border: 1px solid var(--accent2); border-bottom-width: 3px; border-radius: 5px; background: #0f0c08; color: var(--accent); }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 22px; }
.gallery figure { margin: 0; cursor: zoom-in; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; transition: transform .15s, border-color .15s; }
.gallery figure:hover { transform: translateY(-2px); border-color: var(--accent2); }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; background: #0f0c08; }
.gallery figcaption { padding: 8px 12px; font-family: system-ui, sans-serif; font-size: .88em; color: var(--muted); }
.gallery .empty { grid-column: 1/-1; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(8,6,3,.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 96vw; max-height: 86vh; border-radius: 6px; box-shadow: 0 10px 50px rgba(0,0,0,.8); }
.lightbox button { position: absolute; background: rgba(22,18,13,.7); color: var(--text); border: 1px solid var(--line); border-radius: 50%; width: 46px; height: 46px; font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox button:hover { color: var(--accent); border-color: var(--accent2); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-caption { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-family: system-ui, sans-serif; font-size: .9em; color: var(--muted); padding: 0 70px; }

/* download */
.download-box { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--accent2); border-radius: 12px; padding: 28px 26px; margin-top: 10px; }
.download-box h2::after { display: none; }
.download-box h2 { margin-bottom: 10px; }
.sha { margin: 14px 0 0; font-size: .92em; }
#downloads { margin-top: 18px; }
#downloads .btn + .btn { margin-top: 10px; }

footer { padding: 48px 20px 36px; color: var(--muted); font-size: .9em; text-align: center; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { min-height: 64vh; }
  .hero-inner { padding-top: 60px; padding-bottom: 36px; }
  .btn-big { width: 100%; justify-content: center; }
  .lightbox button { width: 40px; height: 40px; font-size: 24px; }
  .lb-caption { padding: 0 20px; bottom: 8px; }
  .keys span { margin-left: 0; width: 100%; }
}
