@font-face {
  font-family: Oswald;
  src: url("../assets/lentils-and-ashes/oswald.woff") format("woff");
  font-display: swap;
  font-weight: 200 700;
}
:root {
  color-scheme: dark;
  --black: #151612;
  --steel: #20231f;
  --ivory: #f7f0dc;
  --muted: #c4c0af;
  --orange: #fc985b;
  --line: #ffffff37;
  --gutter: clamp(1.2rem, 5.3vw, 5.8rem);
  --heading: Oswald, Impact, "Arial Narrow", sans-serif;
  --body: "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--black); color: var(--ivory); font: 1rem/1.53 var(--body); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
a { color: inherit; }
button { font: inherit; }
img, canvas, video { display: block; max-width: 100%; }
.frame { width: min(100%, 93rem); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: fixed; top: .7rem; left: .7rem; z-index: 20; padding: .6rem .9rem; color: var(--black); background: var(--ivory); transform: translateY(-165%); }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.site-header { border-bottom: 1px solid var(--line); background: #171815; }
.bar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .05rem .8rem; min-height: 3.8rem; }
.brand { display: inline-flex; align-items: center; gap: .57rem; width: fit-content; min-height: 2.75rem; font-size: 1.17rem; font-weight: 850; line-height: 1; letter-spacing: -.055em; text-decoration: none; }
.brand-mark { width: 1.14rem; height: 1.05rem; flex: none; background: var(--orange); clip-path: polygon(0 0, 20% 0, 34% 55%, 46% 21%, 63% 21%, 74% 55%, 87% 0, 100% 0, 80% 100%, 65% 100%, 53% 69%, 42% 100%, 26% 100%); }
.bar nav { display: none; align-items: center; gap: clamp(.85rem, 3vw, 2.6rem); }
.bar nav a, .header-steam { display: inline-flex; align-items: center; min-height: 2.75rem; font: 650 .9rem/1.3 var(--body); text-decoration: none; }
.bar nav a { color: var(--muted); }
.bar nav a:hover, .footer-base a:not(.brand):hover { color: var(--orange); }
.header-steam { padding-inline: .85rem; border: 1px solid var(--line); }
.header-steam:hover { border-color: var(--orange); color: var(--orange); }

.hero { position: relative; isolation: isolate; overflow: clip; background: #181a16; scroll-margin-top: .5rem; }
.room { position: absolute; z-index: -2; inset: 0; width: 100%; height: 21rem; object-fit: cover; object-position: center 54%; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, #1516120a, #17181308 6rem, #181a16cf 17rem, #181a16 23rem); }
.hero-inner { display: grid; align-items: center; min-height: 37rem; padding-block: 14.5rem 2.6rem; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .7rem; margin: 0 0 .8rem; color: var(--orange); font: 650 .84rem/1.25 var(--heading); letter-spacing: .13em; text-transform: uppercase; }
.eyebrow time { border-right: 1px solid currentColor; padding-right: .72rem; white-space: nowrap; }
.work-order h1 { margin: 0; font: 700 1rem/1 var(--heading); text-transform: uppercase; }
.work-order h1 span { display: block; font-size: clamp(3.75rem, 17.4vw, 7rem); line-height: .96; letter-spacing: -.066em; white-space: nowrap; }
.work-order h1 strong { display: block; margin-top: .48rem; font-size: clamp(1.7rem, 8.3vw, 3.25rem); line-height: .97; letter-spacing: -.039em; }
.hero-copy { max-width: 25rem; margin: 1.18rem 0 1.25rem; color: var(--muted); font-size: clamp(1rem, 1.45vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.95rem; padding: .62rem 1rem; border: 1px solid var(--line); color: var(--ivory); background: #23251f; font: 650 1.04rem/1.15 var(--heading); letter-spacing: .024em; text-align: center; text-decoration: none; cursor: pointer; }
.button:hover { border-color: var(--orange); }
.button.orange { border-color: transparent; background: var(--orange); color: #20170f; }
.button.orange:hover { background: #ffb078; }
.button.orange:focus-visible { outline-color: var(--ivory); }
.button.utility { background: #171a16; font-size: .92rem; }
.button[aria-disabled="true"] { cursor: wait; opacity: .8; }
.text-action { display: inline-flex; align-items: center; min-height: 2.75rem; color: inherit; font-size: .9rem; font-weight: 630; text-underline-offset: .26em; }
.text-action:hover { color: var(--orange); }
.shift-length { margin: .55rem 0 0; color: #beb9a7; font: 500 .81rem/1.35 var(--heading); letter-spacing: .085em; text-transform: uppercase; }

.hero[data-mode="sorting"]::after, .hero[data-mode="complete"]::after { background: #11140fbd; }
.hero[data-mode="complete"]::before { content: ""; position: absolute; z-index: -1; inset: 0; background: url("../assets/lentils-and-ashes/pile-detail.webp") center 55% / cover; }
.hero[data-mode="sorting"] .room, .hero[data-mode="complete"] .room { height: 100%; }
.hero[data-mode="sorting"] .hero-inner, .hero[data-mode="complete"] .hero-inner { padding-block: clamp(1.7rem, 5vw, 4.1rem); }
.hero:fullscreen { overflow-y: auto; }
.hero:fullscreen .hero-inner { min-height: 100vh; }
.console { position: relative; width: min(100%, 66rem); margin-inline: auto; min-width: 0; }
.console-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .5rem 1rem; }
.console-head .eyebrow { margin-bottom: .28rem; }
.console-head h2, .receipt h2 { margin: 0; font: 700 clamp(2.65rem, 6vw, 5rem)/1.03 var(--heading); letter-spacing: -.03em; text-transform: uppercase; }
.console-actions { display: flex; gap: .45rem; }
.console-actions .button { padding-inline: .65rem; }
.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: .9rem 0; border-block: 1px solid #ffffff3b; background: #171a15d4; }
.counters div { padding: .42rem .65rem .52rem; min-width: 0; }
.counters div + div { border-left: 1px solid #ffffff25; }
.counters dt { color: #d3cbbb; font: 550 .75rem/1.25 var(--heading); letter-spacing: .13em; text-transform: uppercase; }
.counters dd { margin: .1rem 0 0; font: 700 clamp(1.3rem, 4.5vw, 2.1rem)/1.1 var(--heading); font-variant-numeric: tabular-nums; white-space: nowrap; }
.counter-total { color: #bfbbaa; font-size: .7em; }
.sorting-area { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.workbench { grid-column: 1 / -1; grid-row: 1; position: relative; overflow: hidden; padding: .55rem .65rem .65rem; border: 1px solid #b4a57b77; background: #1d201b; box-shadow: inset 0 0 0 3px #0f110f80; text-align: center; }
.workbench .sample-heading { display: flex; justify-content: space-between; padding-inline: .15rem; color: #e0d6b7; font: 550 .81rem/1.25 var(--heading); letter-spacing: .105em; text-transform: uppercase; }
.workbench canvas { width: 100%; height: clamp(8.8rem, 32vw, 14rem); margin: 0 auto; touch-action: pan-y; cursor: grab; }
.workbench canvas:active { cursor: grabbing; }
.workbench .button { position: relative; min-height: 2.75rem; }
kbd { display: inline-grid; place-items: center; min-width: 1.63rem; min-height: 1.6rem; padding-inline: .15rem; border: 1px solid currentColor; font: 600 .77rem/1 var(--body); }
.pit { --pit-tint: #ffab73; display: flex; position: relative; min-width: 0; flex-direction: column; justify-content: end; padding: 0; overflow: clip; border: 1px solid #ffc39166; background: #231b14; color: var(--pit-tint); text-align: left; cursor: pointer; }
.pit.ash { --pit-tint: #c6e5f1; border-color: #b9d1df76; background: #172127; }
.pit:not([aria-disabled="true"]):hover { border-color: currentColor; }
.pit[aria-disabled="true"] { cursor: wait; }
.pit-image { position: relative; display: block; width: 100%; flex: 1; min-height: 3.9rem; background: url("../assets/lentils-and-ashes/lentil-pit.webp") 48% 58% / cover no-repeat; }
.ash .pit-image { background-image: url("../assets/lentils-and-ashes/ash-pit.webp"); }
.pit-image::after { position: absolute; content: ""; inset: 0; background: linear-gradient(0deg, #10120f83, #171a160a); }
.pit-label { position: relative; display: flex; justify-content: space-between; align-items: center; gap: .25rem; width: 100%; min-height: 3rem; padding: .35rem .65rem; border-top: 1px solid currentColor; background: inherit; }
.pit-label strong { font: 650 clamp(1.1rem, 4.2vw, 1.7rem)/1 var(--heading); text-transform: uppercase; }
.pit[data-feedback="correct"] .pit-label { background: #3e573b; color: #f5ffe7; }
.pit[data-feedback="mistake"] .pit-label { background: #6b3027; color: #ffe0d2; }
.sort-status { min-height: 1.7rem; margin: .7rem 0 0; color: #e6dfcc; font-weight: 640; }
.sort-status[data-feedback="mistake"] { color: #ffc2ab; }
.end-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .8rem; margin-top: .65rem; padding: .65rem; border: 1px solid var(--line); background: #20241f; }
.end-confirm p { flex: 1 1 100%; margin: 0; }
.receipt { width: min(100%, 43rem); margin-inline: auto; padding: clamp(1rem, 4vw, 2.5rem); background: #181b17f2; border-block: 1px solid #fff4d45c; text-align: center; }
.receipt .eyebrow, .receipt .hero-actions { justify-content: center; }
.receipt-copy { margin: 1rem 0; color: var(--muted); }
.receipt-copy strong { color: var(--orange); }
.receipt-counters { margin: 1.1rem 0 1.2rem; }

.manual { padding-block: clamp(2.7rem, 7vw, 6.9rem); background: #e6ded0; color: #22241d; }
.manual-layout, .trailer-layout { display: grid; align-items: center; gap: 1.4rem; }
.manual .eyebrow { color: #824219; }
.manual h2, .trailer h2, .scale-copy h2, .press h2 { max-width: 14ch; margin: 0; font: 700 clamp(2.5rem, 6.4vw, 5.6rem)/.97 var(--heading); letter-spacing: -.042em; text-transform: uppercase; }
.material-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.18rem; }
.material-tabs button { padding: .52rem .85rem; min-height: 2.75rem; border: 1px solid #73664e; background: transparent; color: #2b2c24; font: 650 1rem/1.2 var(--heading); cursor: pointer; }
.material-tabs button:hover { background: #d7cdba; }
.material-tabs button[aria-selected="true"] { background: #242820; color: #f8efdb; }
[role="tabpanel"] { margin-top: .72rem; max-width: 25rem; }
[role="tabpanel"] p { margin: 0; color: #424136; }
.manual-visual { position: relative; margin: 0; border: 1px solid #9a8d75; background: #222420; }
.manual-visual img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.manual-visual figcaption { position: absolute; inset: auto auto .6rem .65rem; max-width: calc(100% - 1.3rem); padding: .33rem .52rem; color: var(--ivory); background: #141711e8; font: 550 .78rem/1.3 var(--heading); letter-spacing: .1em; text-transform: uppercase; }

.trailer { padding-block: clamp(2.6rem, 7vw, 6.5rem); }
.trailer-layout p:not(.eyebrow), .press p { max-width: 20rem; margin: .8rem 0; color: var(--muted); }
.trailer video { width: 100%; aspect-ratio: 16/9; border: 1px solid #fff2d750; background: #0c0d0a; }

.scale-lab { padding-block: clamp(2.7rem, 7vw, 6.9rem); border-top: 1px solid #575447; background: #24261f; scroll-margin-top: .65rem; }
.scale-lab:focus { outline: none; }
.scale-layout { display: grid; align-items: center; gap: clamp(1.15rem, 4vw, 4.5rem); }
.scale-copy { min-width: 0; }
.scale-copy h2 { font-size: clamp(2.4rem, 5.25vw, 4.9rem); }
.scale-copy h2 em { display: block; color: var(--orange); font-style: normal; }
.scale-copy > p { max-width: 21rem; margin: .9rem 0; color: var(--muted); }
.scale-readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; padding-block: .35rem .7rem; border-block: 1px solid #bdb19262; }
.scale-readout output { font: 680 clamp(2.45rem, 6vw, 4.7rem)/1.08 var(--heading); letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.scale-readout span, .scale-controls label { color: #ddd2b8; font: 550 .81rem/1.3 var(--heading); letter-spacing: .12em; text-transform: uppercase; }
.scale-controls { margin-top: .85rem; -webkit-tap-highlight-color: #fc985b36; }
.scale-controls label { display: block; }
.scale-controls input { display: block; width: 100%; min-height: 2.75rem; margin: 0; accent-color: var(--orange); cursor: ew-resize; }
.scale-ticks { position: relative; min-height: 1.2em; margin: -.25rem .4rem .9rem; color: #d3cbbb; font: 550 .82rem/1.2 var(--heading); }
.scale-ticks span { position: absolute; }
.scale-ticks span:nth-child(2) { left: 33.33%; transform: translateX(-50%); }
.scale-ticks span:nth-child(3) { left: 66.67%; transform: translateX(-50%); }
.scale-ticks span:last-child { right: 0; }
.scale-compare[aria-pressed="true"] { border-color: var(--orange); color: var(--orange); }
.scale-figure { min-width: 0; margin: 0; }
.scale-view { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 4/3; border: 1px solid #8e8165; background: radial-gradient(ellipse at 48% 44%, #554b32, #22251e 62%, #181b17); }
.scale-layer { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; }
.scale-view[data-stage="0"] .scale-single,
.scale-view[data-stage="1"] .scale-grid-100,
.scale-view[data-stage="2"] .scale-grid-10000,
.scale-view[data-stage="3"] .scale-pile { opacity: 1; }
.scale-single img { width: min(51%, 16rem); height: auto; filter: drop-shadow(0 1.15rem 1rem #12140fc0); }
.scale-grid::before {
  content: "";
  height: 75%;
  aspect-ratio: 1;
  border: 1px solid #c0aa7764;
  background-color: #1b1d17;
  background-image:
    radial-gradient(ellipse 18% 29% at 25% 50%, #efa772 48%, #ca794b 74%, transparent 100%),
    radial-gradient(ellipse 17% 26% at 75% 50%, #bdb9ac 52%, #8d8c80 76%, transparent 100%);
  background-size: var(--grid-cell);
  box-shadow: 0 0 1.8rem #161710b3;
}
.scale-grid-100 { --grid-cell: 20% 10%; }
.scale-grid-10000 { --grid-cell: 2% 1%; }
.scale-pile img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.scale-marker { position: absolute; top: 57%; left: 44%; width: 1.55rem; aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid #ffc08b; border-radius: 50%; box-shadow: 0 0 0 3px #20150ec9, 0 0 .8rem #ff984f; }
.scale-marker::after { position: absolute; top: -1px; left: 85%; width: clamp(2rem, 8vw, 7rem); height: 1px; transform: rotate(-35deg); transform-origin: left center; content: ""; background: #ffc08b; box-shadow: 0 0 3px #231912; }
.scale-inset { position: absolute; top: clamp(.45rem, 2vw, 1.4rem); right: clamp(.45rem, 2vw, 1.4rem); width: min(54%, 14.5rem); padding: clamp(.4rem, 1.2vw, .95rem); border: 1px solid #f6a66f; background: #171a16f5; box-shadow: 0 .6rem 1.6rem #0a0b09bd; }
.scale-inset-label, .scale-magnified { display: block; color: #ded3b7; font: 570 .72rem/1.25 var(--heading); letter-spacing: .085em; text-transform: uppercase; }
.scale-samples { display: grid; gap: .05rem; margin-block: .25rem; }
.scale-samples span { --sample: url("../assets/lentils-and-ashes/scale-lentil.webp"); display: block; width: 100%; aspect-ratio: 6 / 1; background: var(--sample) repeat-x left center / calc(100% / 6) 92%; }
.scale-samples span + span { --sample: url("../assets/lentils-and-ashes/scale-ash.webp"); filter: brightness(1.45); }
.scale-inset p { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .35rem; margin: .1rem 0 .25rem; color: #e4d8c0; font-size: .73rem; }
.scale-inset strong { color: #ffaf77; font: 680 clamp(1.1rem, 3vw, 2.1rem)/1.1 var(--heading); }
.scale-magnified { color: #b7ad99; font-size: .65rem; }
.scale-figure figcaption { min-height: 2.55em; margin-top: .52rem; color: #e1d6bf; font-size: .83rem; }

.press { background: #21231e; border-top: 1px solid var(--line); }
.press-intro { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem 1rem; padding-block: clamp(2.25rem, 5vw, 4.4rem); }
.press h2 { max-width: none; font-size: clamp(2.05rem, 5vw, 3.7rem); }
.press p { max-width: 32rem; margin-bottom: 0; }
.footer-base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .2rem .75rem; border-top: 1px solid var(--line); padding-block: .55rem; }
.footer-base a:not(.brand) { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--muted); font-size: .82rem; text-decoration: none; }

@media (min-width: 42rem) {
  .bar { grid-template-columns: 1fr auto 1fr; min-height: 4.1rem; }
  .bar nav { display: flex; }
  .header-steam { justify-self: end; }
  .room { inset: 0 0 0 auto; width: 88%; height: 100%; object-position: center 58%; }
  .hero::after { background: linear-gradient(90deg, #181a16 3%, #181a16f5 15%, #181a16bf 33%, #181a1640 56%, #181a1600 70%), linear-gradient(0deg, #171a1695, #171a1600 29%); }
  .hero-inner { min-height: clamp(32rem, calc(91svh - 4.1rem), 48rem); padding-block: 3.3rem; }
  .work-order h1 span { font-size: clamp(6.15rem, 12.35vw, 11.6rem); }
  .work-order h1 strong { font-size: clamp(2.7rem, 5.7vw, 5.1rem); }
  .hero-copy { margin-block: 1.35rem 1.25rem; }
  .sorting-area { grid-template-columns: minmax(0, .87fr) minmax(0, 1.3fr) minmax(0, .87fr); gap: .85rem; }
  .workbench { grid-column: 2; grid-row: 1; }
  .ash { grid-column: 3; grid-row: 1; }
  .counters { margin: 1.05rem 0; }
  .counters div { padding: .46rem .83rem .55rem; }
  .manual-layout, .trailer-layout { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: clamp(1.4rem, 5vw, 5rem); }
}
@media (min-width: 48rem) {
  .scale-layout { grid-template-columns: minmax(0, .86fr) minmax(0, 1.55fr); }
  .scale-view { aspect-ratio: 16/10; }
}
@media (max-width: 30rem) {
  .scale-inset { top: auto; bottom: .45rem; width: 49%; }
  .scale-marker::after { top: 62%; transform: rotate(22deg); }
}
@media (max-width: 22.5rem) {
  .pit-label { padding-inline: .45rem; }
  .console-actions .button { padding-inline: .56rem; }
  .counters div { padding-inline: .46rem; }
}
@media (pointer: coarse) {
  .pit-label kbd, .workbench kbd { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button, .header-steam, .material-tabs button, .pit { transition: color .16s ease, background-color .16s ease, border-color .16s ease; }
  .pit-image { transition: filter .2s ease; }
  .pit:hover .pit-image { filter: brightness(1.2); }
  .work-order, .receipt { animation: settle .42s ease-out both; }
  .scale-layer { transform: scale(1.07); transition: opacity .32s ease, transform .55s cubic-bezier(.2, .7, .2, 1); }
  .scale-view[data-stage="0"] .scale-single,
  .scale-view[data-stage="1"] .scale-grid-100,
  .scale-view[data-stage="2"] .scale-grid-10000,
  .scale-view[data-stage="3"] .scale-pile { transform: none; }
  .scale-inset { animation: settle .24s ease-out both; }
  @keyframes settle { from { opacity: 0; transform: translateY(.48rem); } to { opacity: 1; transform: translateY(0); } }
}
