/* Stillroom site styles, shared by every page */
@font-face { font-family: "Mulish"; src: url("/fonts/Mulish-latin.woff2") format("woff2"); font-weight: 300 500; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mulish"; src: url("/fonts/Mulish-latin-ext.woff2") format("woff2"); font-weight: 300 500; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Serif Display"; src: url("/fonts/DMSerifDisplay-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Serif Display"; src: url("/fonts/DMSerifDisplay-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
:root {
  --bg: #f3ece1;
  --ink: #1b1a1b;
  --muted: #5f564a;
  --accent: #fca91f;
  --accent-ink: #b8761a;
  --line: #ddd3c3;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Mulish", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
section[id], footer[id] { scroll-margin-top: 24px; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: #f0d29a; }
body { background: var(--bg); color: var(--ink); font: 300 1.125rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
.wrap { overflow-x: clip; max-width: 1440px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 52px); }

/* Header */
header { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font: 400 2.1rem/1 var(--serif); text-decoration: none; letter-spacing: -0.005em; }
.brand img { width: 56px; height: 56px; }

.btn { display: inline-flex; align-items: center; gap: 12px; border-radius: 999px; padding: 12px 30px; font: 400 1rem var(--sans); text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { background: #ffb840; }
.btn-lg { padding: 18px 34px; font-size: 1.2rem; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.35fr); gap: clamp(24px, 3.5vw, 56px); align-items: center; padding: 24px 0 48px; }
h1 { font: 400 clamp(2rem, 3.4vw, 3.2rem)/1.04 var(--serif); letter-spacing: -0.015em; }
.lede { color: var(--muted); font-size: 1.3rem; max-width: 30ch; margin: 28px 0 32px; }
.download { display: inline-flex; flex-direction: column; align-items: center; }
.build { color: var(--muted); font-size: .85rem; line-height: 1.5; text-align: center; }
.build:first-of-type { margin-top: 14px; }
.btn-download { flex-direction: column; gap: 2px; padding-top: 14px; padding-bottom: 12px; }
.btn-main { display: inline-flex; align-items: center; gap: 12px; }
.btn-sub { font-size: .78rem; font-weight: 500; letter-spacing: .02em; opacity: .75; }

/* Showcase: light/dark screenshots */
.showcase { position: relative; }
/* Screenshots are 1600x1000 with 18px rounded corners baked in; the radius below matches them */
.frame { --r: 1.125% / 1.8%; display: grid; aspect-ratio: 1600 / 1000; border-radius: var(--r); box-shadow: 0 30px 60px -20px rgba(60,40,10,.35); }
.frame > * { grid-area: 1 / 1; width: 100%; height: 100%; border-radius: var(--r); }
/* Dark sits underneath; light fades in on top, so there's never a see-through moment */
#shot-light { transition: opacity .35s ease; }
.frame[data-theme="dark"] #shot-light { opacity: 0; }
[hidden] { display: none !important; }

.theme-toggle { position: absolute; right: 14px; bottom: -22px; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: #fffaf2; box-shadow: 0 6px 18px rgba(60,40,10,.18); }
.theme-toggle button { border: 0; background: transparent; border-radius: 999px; padding: 7px 14px; font: 400 .85rem var(--sans); color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.theme-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--ink); }
.theme-toggle svg { width: 15px; height: 15px; }

/* Features */
.features { border-top: 1px solid var(--line); padding: 48px 0; }
.eyebrow { color: var(--accent-ink); font-weight: 500; font-size: .85rem; letter-spacing: .2em; text-transform: uppercase; }
h2 { font: 400 clamp(2.2rem, 4.4vw, 3.6rem)/1.1 var(--serif); letter-spacing: -0.01em; margin: 6px 0 40px; }
h3 { font: 400 1.6rem/1.2 var(--serif); letter-spacing: 0; margin-bottom: 10px; }

/* Hero glow behind the screenshot */
.showcase::before { content: ""; position: absolute; inset: -12% -8%; z-index: -1; background: radial-gradient(closest-side, rgba(224,164,58,.28), transparent); filter: blur(10px); }
.hero { position: relative; isolation: isolate; }

/* Philosophy band */
.philosophy { background: #221d17; color: #efe6d6; border-radius: 24px; padding: clamp(40px, 6vw, 88px) clamp(24px, 6vw, 88px); display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(32px, 6vw, 96px); align-items: center; margin-bottom: 72px; position: relative; overflow: hidden; }
.philosophy .eyebrow { color: var(--accent); }
.philosophy h2 { color: #f6efe3; margin-bottom: 0; }
.philosophy .art { display: block; margin-top: 40px; width: min(320px, 85%); height: auto; }
.philosophy blockquote p { font: 400 italic clamp(1.25rem, 1.9vw, 1.6rem)/1.6 var(--serif); color: #e6dccb; }
.philosophy blockquote p + p { margin-top: 1.1em; font-style: normal; font-family: var(--sans); font-size: 1.1rem; color: #b9ad9a; }


/* Links inside the small download notes */
.build a, .link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.build a:hover, .link:hover { color: var(--accent-ink); }

/* Install help panel */
.install-help { position: relative; margin-top: 16px; max-width: 400px; padding: 18px 44px 18px 20px; text-align: left; font-size: .9rem; line-height: 1.55; color: var(--muted); background: #fffaf2; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 14px; box-shadow: 0 10px 28px -12px rgba(60,40,10,.3); }
.install-help p + p { margin-top: 8px; }
.install-help strong { color: var(--ink); font-weight: 500; }
.install-title { font: 400 1.15rem/1.3 var(--serif); color: var(--ink); }
.install-note { font-size: .82rem; }
.install-close { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border: 0; background: none; border-radius: 50%; font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer; }
.install-close:hover { background: #efe6d6; color: var(--ink); }


/* Feedback */
.feedback { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(32px, 6vw, 96px); padding: clamp(28px, 5vw, 64px); margin-bottom: 64px; border: 1px solid var(--line); border-radius: 24px; background: #f8f3ea; }
.feedback h2 { margin-bottom: 16px; }
.feedback .intro { color: var(--muted); max-width: 34ch; }
.kind { border: 0; padding: 0; display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #efe6d6; margin-bottom: 16px; }
.kind legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.kind input { position: absolute; opacity: 0; pointer-events: none; }
.kind label { padding: 8px 18px; border-radius: 999px; font-size: .95rem; font-weight: 400; color: var(--muted); cursor: pointer; }
.kind input:checked + label { background: #fffdf9; color: var(--ink); box-shadow: 0 2px 6px rgba(60,40,10,.12); }
.kind input:focus-visible + label { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.feedback textarea { display: block; width: 100%; min-height: 168px; resize: vertical; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fffdf9; color: var(--ink); font: 400 1rem/1.6 var(--sans); }
.feedback textarea::placeholder { color: #9a8f80; }
.feedback textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(252,169,31,.25); }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 16px; }
.form-foot .btn { padding: 12px 28px; }
.form-foot small { color: var(--muted); font-size: .85rem; }

/* Footer */
footer { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0 28px; flex-wrap: wrap; }
footer .brand { font-size: 1.6rem; }
footer .brand img { width: 40px; height: 40px; }
.credits { display: flex; align-items: center; gap: 20px; font-size: .95rem; color: var(--muted); }
.disclaimer { flex-basis: 100%; color: var(--muted); font-size: .8rem; line-height: 1.5; padding-top: 4px; }
.credits a { color: var(--ink); }
.credits .ig { display: flex; align-items: center; gap: 10px; text-decoration: none; padding-left: 20px; border-left: 1px solid var(--line); }
.credits .ig svg { width: 24px; height: 24px; }

/* Mobile */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.4rem, 10vw, 3.2rem); }
  .philosophy { grid-template-columns: 1fr; border-radius: 18px; }
  .philosophy .art { display: none; }
  .feedback { grid-template-columns: 1fr; border-radius: 18px; }
}
@media (max-width: 520px) {
  .brand { font-size: 1.6rem; }
  .brand img { width: 44px; height: 44px; }
  .btn-lg, .download { width: 100%; justify-content: center; }
  .credits { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .btn, #shot-light { transition: none; } }

/* ---- Multi-page additions ---- */

/* Top navigation */
.site-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 34px); font-size: .98rem; font-weight: 400; }
.site-nav a { text-decoration: none; color: var(--muted); padding: 6px 0; border-bottom: 1.5px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Lightbox spotlight (home) */
.section-intro { max-width: 46ch; color: var(--muted); font-size: 1.2rem; margin: -20px 0 8px; }
.spotlight { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding: 48px 0 64px; }
.spotlight h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.12; margin: 6px 0 18px; }
.spotlight-text p { color: var(--muted); font-size: 1.05rem; margin-bottom: 18px; }
.spotlight-text strong { font-weight: 500; color: var(--ink); }
.spotlight-text ul { padding-left: 1.1em; font-size: 1rem; color: #3d362d; }
.spotlight-text li { margin: 8px 0; }
.spotlight-text li::marker { color: var(--accent); }
.spotlight-shot img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 30px 60px -24px rgba(60,40,10,.4), 0 0 0 1px rgba(0,0,0,.06); }
.spotlight-shot figcaption { margin-top: 12px; color: var(--muted); font-size: .88rem; text-align: right; }

.arrow-link { font-weight: 500; text-decoration: none; white-space: nowrap; border-bottom: 1.5px solid var(--accent); padding-bottom: 2px; }
.arrow-link:hover { color: var(--accent-ink); }

/* Feature pillars (home) */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pillar { padding: 28px 28px 24px; border: 1px solid var(--line); border-radius: 20px; background: #f8f3ea; }
.pillar svg { width: 40px; height: 40px; stroke: var(--accent); fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; margin-bottom: 14px; }
.pillar h3 { font-size: 1.45rem; margin-bottom: 6px; }
.pillar > p { color: var(--muted); font-size: .98rem; margin-bottom: 14px; }
.pillar ul { padding-left: 1.1em; font-size: .92rem; line-height: 1.5; color: #3d362d; }
.pillar li { margin: 5px 0; }
.pillar li::marker { color: var(--accent); }
.pillar-private { background: #221d17; border-color: #221d17; }
.pillar-private h3 { color: #f6efe3; }
.pillar-private > p { color: #cfc3ae; }
.pillar-private ul { color: #e6dccb; }
.formats { margin-top: 22px; font-size: .95rem; color: var(--muted); }

/* Closing download panel (home) */
.closing { display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px); margin-bottom: 40px; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(120% 140% at 50% 0%, #fbf3e3, #f3ece1 70%); }
.closing h2 { margin: 6px auto 28px; max-width: 18ch; }
.closing .facts { margin-top: 16px; color: var(--muted); font-size: .92rem; }
.closing .latest-line { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .95rem; color: var(--muted); }
.closing .latest-line strong { color: var(--ink); font-weight: 500; }

/* Inner pages */
.page-head { padding: 32px 0 40px; max-width: 760px; }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.08; margin: 6px 0 16px; }
.page-head p { color: var(--muted); font-size: 1.15rem; }
.prose { font-size: 1.05rem; color: #3d362d; }
.prose h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin: 0 0 14px; color: var(--ink); }
.prose h3 { font-size: 1.3rem; margin: 26px 0 8px; color: var(--ink); }
.prose p, .prose ul, .prose ol, .prose .table-wrap { margin-bottom: 14px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--accent-ink); }
.prose strong { font-weight: 500; color: var(--ink); }
.prose a { text-underline-offset: 2px; }
.prose a:hover { color: var(--accent-ink); }
code, kbd { font-family: Consolas, "SF Mono", monospace; font-size: .86em; background: #efe6d6; padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; background: #fffaf2; white-space: nowrap; }
.callout { padding: 16px 20px; border-radius: 14px; background: #fffaf2; border: 1px solid var(--line); border-left: 4px solid var(--accent); margin-bottom: 16px; }
.callout p:last-child { margin-bottom: 0; }

/* Tables scroll inside their own box on small screens */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fffaf2; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 500; color: var(--ink); background: #f3ece1; }
.prose tr:last-child td { border-bottom: 0; }

/* Help page: contents list beside the articles */
.help-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; padding-bottom: 72px; }
.toc { position: sticky; top: 24px; font-size: .95rem; }
.toc p { font-weight: 500; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; color: var(--accent-ink); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); border-left-color: var(--accent); }
.help-section { padding: 36px 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.help-section:first-child { padding-top: 0; border-top: 0; }

/* Releases page */
.release-list { display: grid; gap: 24px; padding-bottom: 40px; max-width: 880px; }
.entry { padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: 24px; background: #f8f3ea; scroll-margin-top: 16px; }
.entry-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 6px; }
.entry-head h2 { margin: 0; }
.entry-date { color: var(--muted); font-size: 1rem; }
.badge { font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--ink); align-self: center; }
.entry-summary { color: var(--muted); margin-bottom: 8px; }
.entry-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; margin-top: 22px; }
.entry-actions .download { align-items: flex-start; }
.entry-actions .install-help { margin-top: 12px; }
.older { color: var(--muted); font-size: 1rem; padding-bottom: 72px; }

/* 404 */
.not-found { padding: 64px 0 96px; text-align: center; }
.not-found img { margin: 0 auto 28px; width: min(260px, 70%); height: auto; }
.not-found h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 12px; }
.not-found p { color: var(--muted); margin-bottom: 28px; }
.not-found .links { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }

/* Footer links */
.footer-links { display: flex; gap: 20px; font-size: .95rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.feedback .alt { margin-top: 14px; font-size: .9rem; color: var(--muted); }
.feedback .alt a { color: var(--ink); }

@media (max-width: 1100px) {
}
@media (max-width: 960px) {
  .help-layout { grid-template-columns: 1fr; }
  .spotlight { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-intro { margin-top: -24px; }
  .spotlight-shot figcaption { text-align: left; }
  .toc { position: static; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: #f8f3ea; }
  .toc ol { columns: 2; column-gap: 24px; border-left: 0; }
  .toc a { padding-left: 0; border-left: 0; }
}
@media (max-width: 600px) {
  .toc ol { columns: 1; }
  .pillars { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .site-nav .nav-features { display: none; }
}
