/* AshLight project page. Night-first palette: the product is used in the dark. */
:root {
  color-scheme: dark;
  --bg: #0c0a09; --surface-1: #14110f; --surface-2: #1c1815; --line: #2c2622;
  --text-primary: #f2e9e1; --text-secondary: #c2b5a9; --text-muted: #8c8075;
  --accent: #ff5a1f; --accent-soft: #ff5a1f22; --copper: #c27a4a;
  --zone-1: #9c3a17; --zone-2: #d4582a; --zone-3: #ea8f5e; --zone-4: #f2c4a4;
  --bar-muted: #4a413a;
  --ok: #4fae7a; --warn: #e0a53a;
  --radius: 14px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text-primary); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: #ff8a5c; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0 0 .4em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { color: var(--text-secondary); margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .88em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
section { padding: 72px 0 24px; border-top: 1px solid var(--line); }
.kicker { font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.lede { font-size: 1.15rem; max-width: 760px; }

/* nav */
nav.top { position: sticky; top: 0; z-index: 20; background: #0c0a09e6; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
nav.top .wrap { display: flex; align-items: center; gap: 22px; height: 54px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
nav.top .brand { font-family: var(--serif); font-size: 1.25rem; color: var(--text-primary); text-decoration: none; margin-right: auto; display: flex; gap: 10px; align-items: center; }
nav.top .brand i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px 4px #ff5a1f88; }
nav.top a:not(.brand) { color: var(--text-secondary); text-decoration: none; font-size: 14px; }
nav.top a:not(.brand):hover { color: var(--text-primary); }

/* hero */
.hero { padding: 48px 0 18px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--accent); text-shadow: 0 0 28px #ff5a1f66; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: end; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fact { background: var(--surface-1); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.fact b { display: block; font: 600 1.25rem/1.2 var(--sans); color: var(--text-primary); }
.fact span { font-size: 12.5px; color: var(--text-muted); }

/* viewer */
.viewer { position: relative; height: min(80vh, 760px); min-height: 520px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: #050403; margin: 22px 0 8px; touch-action: none; }
.viewer canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.viewer.pressing canvas { cursor: pointer; }
.overlay { position: absolute; pointer-events: none; }
.overlay > * { pointer-events: auto; }
.rooms { top: 14px; left: 14px; right: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 500 13px/1 var(--sans); color: var(--text-secondary); background: #0c0a09c4; border: 1px solid #ffffff1c; padding: 9px 12px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(8px); transition: .15s; }
.chip:hover { color: var(--text-primary); border-color: #ffffff40; }
.chip[aria-pressed="true"] { color: #fff; background: #ff5a1f33; border-color: #ff5a1f; }
.status { top: 62px; right: 14px; width: 232px; background: #0c0a09d0; border: 1px solid #ffffff1a; border-radius: 14px; padding: 14px; backdrop-filter: blur(10px); }
.status .mode { font: 500 1.35rem/1.2 var(--serif); }
.status .row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-secondary); padding: 3px 0; }
.status .row b { color: var(--text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.zbars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; height: 72px; align-items: end; margin: 10px 0 4px; }
.zbars div { background: var(--zone-2); border-radius: 4px 4px 0 0; min-height: 2px; transition: height .05s linear; }
.zbars div:nth-child(1) { background: var(--zone-1); } .zbars div:nth-child(3) { background: var(--zone-3); } .zbars div:nth-child(4) { background: var(--zone-4); }
.zlabels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-size: 11px; color: var(--text-muted); text-align: center; }
.settings { left: 14px; bottom: 14px; display: grid; gap: 8px; max-width: calc(100% - 300px); }
.settings .group { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.settings .group > span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); width: 70px; }
.btnwrap { right: 14px; bottom: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 232px; }
.lampbtn { width: 86px; height: 86px; border-radius: 50%; border: 2px solid #ffffff2a; background: radial-gradient(circle at 35% 30%, #3a2a20, #1a1310 70%); color: var(--text-secondary); font: 600 12px/1.2 var(--sans); cursor: pointer; user-select: none; -webkit-user-select: none; box-shadow: 0 6px 24px #000a, inset 0 1px 0 #ffffff14; transition: transform .06s; touch-action: none; }
.lampbtn.down { transform: scale(.94); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px #ff5a1f33, 0 6px 24px #000a; }
.btnhint { font-size: 12px; color: var(--text-muted); text-align: center; }
.blurb { left: 14px; top: 56px; font-size: 13px; color: var(--text-secondary); background: #0c0a09b0; padding: 6px 12px; border-radius: 999px; max-width: calc(100% - 290px); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .viewer { height: 86vh; }
  .status { top: auto; bottom: 120px; right: 10px; width: 170px; padding: 10px; }
  .status .zbars { height: 40px; }
  .settings { max-width: calc(100% - 20px); bottom: 10px; left: 10px; }
  .settings .group > span { width: 100%; }
  .btnwrap { right: 10px; top: 60px; bottom: auto; width: 110px; }
  .lampbtn { width: 70px; height: 70px; }
  .blurb { display: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}

/* content blocks */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin-bottom: .3em; }
.card p:last-child { margin-bottom: 0; }
.tile b { font: 600 1.7rem/1.1 var(--sans); display: block; margin-bottom: 4px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.tile span { color: var(--text-muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text-muted); font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-1); }
.pill { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-secondary); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: #4fae7a55; } .pill.warn { color: var(--warn); border-color: #e0a53a55; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.gallery a { display: block; background: #f7f3ee; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.gallery img { width: 100%; height: 230px; object-fit: cover; object-position: top left; display: block; }
.gallery figcaption { font-size: 13px; color: var(--text-muted); padding: 8px 2px 0; }
@media (max-width: 860px) { .gallery { grid-template-columns: 1fr; } }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; padding-left: 44px; position: relative; color: var(--text-secondary); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; }
.steps li b { color: var(--text-primary); }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; font: 13px/1.55 var(--mono); color: var(--text-primary); }
.diagram { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.diagram svg { width: 100%; height: auto; display: block; }

/* charts */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis text, .chart .label { fill: var(--text-muted); font: 12px var(--sans); }
.chart .value { fill: var(--text-primary); font: 600 12px var(--sans); }
.chart .grid line { stroke: var(--line); }
.tip { position: absolute; pointer-events: none; background: #0c0a09f2; border: 1px solid #ffffff22; border-radius: 8px; padding: 6px 9px; font-size: 12.5px; color: var(--text-primary); white-space: nowrap; opacity: 0; transition: opacity .1s; z-index: 5; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-secondary); margin: 6px 0 2px; }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
details { margin-top: 10px; } summary { cursor: pointer; color: var(--text-muted); font-size: 13px; }
footer { padding: 40px 0 60px; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: 60px; }
.note { font-size: 13px; color: var(--text-muted); }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.shots figure { margin: 0; }
.shots img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; }
.shots figcaption { font-size: 12.5px; color: var(--text-muted); padding-top: 6px; }
@media (max-width: 860px) { .shots { grid-template-columns: 1fr 1fr; } }
