/* cave.fyi /1/: a cave by firelight. Flat fills, no borders, no hard shadows.
   Kin to doom.ooo (black), am-i.ooo (night blue) and roman.forum (travertine);
   this one is umber rock and red ochre. */
:root {
  --bg: #17100c; --rock: #221812; --slab: #2b1e16; --slab2: #35261c; --line: #4b3728;
  --ink: #f3e6cf; --dim: #bfa588; --faint: #8d745c;
  --ochre: #d2492c; --ochre-d: #a33620; --fire: #f7a531; --ember: #ffcf6b; --moss: #86a34a;
  --paper: #ecd7b1; --paper-ink: #2a1a10;
  --fat: "Caprasimo", "Cooper Black", Georgia, serif;
  --sans: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --col: 700px; --r: 10px;
  --tx: 50vw; --ty: 46vh; --tr: 78vmax;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 58px; }
body { background-color: var(--bg); background-image: var(--rock-img, none); background-size: 192px 192px; image-rendering: pixelated; color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; text-wrap: pretty; overflow-x: hidden; }
img { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--ochre); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ember); }
.wrap { max-width: var(--col); margin: 0 auto; padding: 0 20px; }
section { padding: 50px 0 46px; position: relative; }
h1, h2, h3 { font-family: var(--fat); font-weight: 400; line-height: 1.08; }
h1 { font-size: clamp(40px, 11vw, 72px); color: #fff3dc; }
h2 { font-size: clamp(32px, 8.6vw, 50px); margin-bottom: 14px; color: #fff3dc; }
h3 { font-size: 24px; margin: 34px 0 10px; color: #ffe9c4; }
p { margin-bottom: 1em; }
.kick { font-size: 12.5px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; color: var(--fire); margin-bottom: 12px; }
.lede { font-size: clamp(19px, 5.2vw, 23px); line-height: 1.45; color: #ffe9c4; }
.dimmer { color: var(--dim); }
code, .mono { font-family: var(--mono); font-size: .9em; }
p code, li code { background: #0f0a07; color: var(--ember); padding: 2px 6px; border-radius: 5px; white-space: nowrap; }

/* the torch: darkness that lifts where the light is. .dark never takes a tap. */
.dark { position: fixed; inset: 0; z-index: 20; pointer-events: none; background: radial-gradient(circle var(--tr) at var(--tx) var(--ty), rgba(8, 4, 2, 0) 0%, rgba(8, 4, 2, 0) 42%, rgba(8, 4, 2, .58) 100%); transition: opacity 1.2s; }
.glow { position: fixed; inset: 0; z-index: 19; pointer-events: none; background: radial-gradient(circle 46vmax at var(--tx) var(--ty), rgba(255, 160, 60, .10), rgba(255, 160, 60, 0) 70%); mix-blend-mode: screen; }
body.lit .dark { opacity: 0; }

.mast { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; height: 50px; padding: 0 14px; background: rgba(23, 16, 12, .93); backdrop-filter: blur(6px); }
.mast .mark { display: flex; align-items: center; gap: 7px; font-family: var(--fat); font-size: 19px; text-decoration: none; color: #fff3dc; white-space: nowrap; }
.mast .mark img { width: 15px; height: auto; image-rendering: pixelated; margin-top: -6px; }
.mast nav { display: flex; gap: 14px; align-items: center; font-size: 13.5px; font-weight: 650; white-space: nowrap; }
.mast nav a { text-decoration: none; color: var(--dim); }
.mast nav a:hover { color: var(--ember); }
.lsbtn { font-family: var(--mono); font-size: 14px; font-weight: 700; background: var(--ochre); color: #fff3dc; border: 0; border-radius: 7px; padding: 7px 13px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lsbtn:hover { background: var(--fire); color: #2a1408; }
@media (max-width: 480px) { .mast nav { gap: 11px; font-size: 13px; } .mast .mark { font-size: 17px; } .mast { padding: 0 11px; } }
@media (max-width: 370px) { .mast nav a.hide-s { display: none; } }

.hero { padding: 0; }
.hero .art { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: cover; object-position: 50% 45%; image-rendering: pixelated; }
.hero-text { padding-top: 30px; padding-bottom: 4px; }
.byline { font-size: 14px; color: var(--dim); margin-top: 16px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px; }
.btn { display: inline-block; font-weight: 750; font-size: 15.5px; text-decoration: none; background: var(--ochre); color: #fff3dc; padding: 11px 18px; border-radius: 7px; }
.btn:hover { background: var(--fire); color: #2a1408; }
.btn.alt { background: var(--slab2); color: var(--ink); }

/* a strip of lit wall between the chambers */
.strip { position: relative; height: 230px; overflow: hidden; background: radial-gradient(ellipse 78% 80% at 50% 52%, #c07a3e 0%, #99592e 34%, #5d3920 66%, #2a1a11 90%, var(--bg) 100%); }
.strip::before { content: ""; position: absolute; inset: 0; background-image: var(--wall-img, none); background-size: 192px 192px; image-rendering: pixelated; opacity: .55; mix-blend-mode: multiply; }
.strip.deep { background: radial-gradient(ellipse 76% 80% at 50% 52%, #8a5a3a 0%, #6a4129 36%, #40281b 68%, #21150f 92%, var(--bg) 100%); }
.strip.deeper { background: radial-gradient(ellipse 74% 80% at 50% 52%, #5f4a52 0%, #48363b 38%, #2c2024 70%, #1b1210 94%, var(--bg) 100%); }
.strip > * { position: absolute; }
.strip img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.p { width: var(--w, 74px); transform: translate(-50%, -50%); }
.p[data-f]::after { content: attr(data-f); position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 2px; font-family: var(--mono); font-size: 10.5px; line-height: 1.2; color: #fff3dc; background: rgba(15, 10, 7, .82); padding: 2px 6px; border-radius: 4px; white-space: nowrap; opacity: 0; transition: opacity .5s; pointer-events: none; }
body.lit .p[data-f]::after { opacity: 1; }
.p.paint img { opacity: .9; mix-blend-mode: multiply; filter: saturate(1.15); }
.p.top { transform: translate(-50%, 0); top: -4px !important; }
.p.floor { transform: translate(-50%, -100%); top: 100% !important; }
.p.glowy img { animation: glowy 3.6s ease-in-out infinite; }
@keyframes glowy { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.28) drop-shadow(0 0 7px rgba(255, 190, 80, .55)); } }
.p.bat { cursor: pointer; -webkit-tap-highlight-color: transparent; background: none; border: 0; padding: 0; transition: left 2.4s cubic-bezier(.3, .1, .4, 1), top 2.4s cubic-bezier(.3, .1, .4, 1), opacity .6s; }
.p.bat.gone { opacity: 0; pointer-events: none; }
.ember { width: 4px; height: 4px; background: var(--ember); border-radius: 0; opacity: 0; animation: ember 3.2s linear infinite; }
@keyframes ember { 0% { opacity: 0; transform: translate(0, 0); } 12% { opacity: .95; } 100% { opacity: 0; transform: translate(var(--dx, 10px), -90px); } }
@media (max-width: 560px) { .strip { height: 190px; } .p { width: calc(var(--w, 74px) * .82); } .hide-s { display: none; } }

.slab { background: var(--slab); border-radius: var(--r); padding: 22px 20px; margin: 22px 0; }
.slab .lab { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--fire); margin-bottom: 10px; }
.slab p:last-child { margin-bottom: 0; }
.slab .ico { float: right; width: 66px; height: auto; margin: -6px -2px 6px 14px; image-rendering: pixelated; }

ul.carved { list-style: none; margin: 20px 0 24px; }
ul.carved li { position: relative; padding: 13px 14px 13px 54px; background: var(--slab); border-radius: var(--r); margin-bottom: 8px; font-size: 18px; line-height: 1.4; color: #ffe9c4; }
ul.carved li b { color: #fff; font-weight: 750; }
ul.carved li::before { content: ""; position: absolute; left: 13px; top: 50%; width: 28px; height: 28px; transform: translateY(-50%); background: var(--i) center / contain no-repeat; image-rendering: pixelated; }
ul.plain { list-style: none; margin: 14px 0 18px; }
ul.plain li { padding: 9px 0 9px 22px; position: relative; }
ul.plain li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 8px; height: 8px; background: var(--ochre); }

.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.three div { background: var(--slab); border-radius: var(--r); padding: 16px 15px; font-size: 15.5px; line-height: 1.45; color: var(--dim); }
.three b { display: block; font-family: var(--fat); font-weight: 400; font-size: 23px; color: #fff3dc; margin-bottom: 5px; }
@media (max-width: 600px) { .three { grid-template-columns: 1fr; } }

.term { background: #0d0806; border-radius: var(--r); padding: 16px 16px 15px; margin: 20px 0; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: #ead9bd; overflow-x: auto; }
.term .pr { color: var(--fire); }
.term .c { color: var(--faint); }
.term .nums { display: flex; flex-wrap: wrap; gap: 3px 4px; margin: 4px 0; }
.term .nums a, .term .nums span { display: inline-block; min-width: 34px; padding: 3px 0; text-align: center; text-decoration: none; background: #1d140f; border-radius: 5px; color: #ffe9c4; }
.term .nums a:hover { background: var(--ochre); color: #fff; }
.term .nums .dir { color: var(--moss); padding: 3px 9px; }
.term .nums .ptr { color: var(--ember); padding: 3px 9px; background: #2a1a10; }
.term pre { font: inherit; white-space: pre; }
.cap { font-size: 14px; color: var(--dim); margin-top: -8px; }

blockquote { margin: 24px 0; padding: 4px 0 4px 20px; position: relative; font-family: var(--fat); font-size: clamp(21px, 5.6vw, 27px); line-height: 1.25; color: #ffe9c4; }
blockquote::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 6px; background: var(--ochre); border-radius: 3px; }
blockquote cite { display: block; margin-top: 10px; font-family: var(--sans); font-style: normal; font-size: 13.5px; font-weight: 650; color: var(--dim); }

/* fifty-four years of sediment */
.strata { position: relative; margin: 26px 0 10px; border-radius: var(--r); overflow: hidden; line-height: 0; }
.strata canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.strata .lay { position: absolute; left: 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.2; color: rgba(255, 243, 220, .92); text-shadow: 0 1px 0 rgba(0, 0, 0, .45); transform: translateY(-50%); white-space: nowrap; }
.strata .lay b { font-weight: 700; }
.strata .who { position: absolute; width: 13%; min-width: 44px; transform: translate(-50%, -100%); image-rendering: pixelated; }
.strata .who img { width: 100%; display: block; image-rendering: pixelated; }

/* the rock: last night, pressed into stone */
.fossils { background: #2a2522; border-radius: var(--r); margin: 24px 0; padding: 8px 0 10px; overflow: hidden; }
.fossils .row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.fossils .row + .row { background: linear-gradient(rgba(0, 0, 0, .18), rgba(0, 0, 0, 0) 9px); }
.fossils .when { flex: 0 0 104px; font-family: var(--mono); font-size: 11.5px; line-height: 1.3; color: #a59684; }
.fossils .imp { display: flex; gap: 9px; flex: 1; min-width: 0; }
.fossils .imp img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; filter: grayscale(1) brightness(.34) contrast(1.5) drop-shadow(0 1px 0 rgba(255, 255, 255, .13)); opacity: var(--o, .8); }
@media (max-width: 480px) { .fossils .when { flex-basis: 86px; } .fossils .imp img { width: 31px; height: 31px; } .fossils .imp { gap: 6px; } }

/* your own wall */
.toy { background: radial-gradient(ellipse 90% 120% at 50% 40%, #b06e39 0%, #7c4a28 50%, #3c2518 100%); border-radius: var(--r); margin: 22px 0 10px; padding: 18px 14px 14px; position: relative; overflow: hidden; }
.toy::before { content: ""; position: absolute; inset: 0; background-image: var(--wall-img, none); background-size: 192px 192px; image-rendering: pixelated; opacity: .5; mix-blend-mode: multiply; pointer-events: none; }
.toy > * { position: relative; }
.toy .herd { display: flex; flex-wrap: wrap; gap: 4px 6px; min-height: 86px; align-items: flex-end; }
.toy .b { width: 62px; text-align: center; font-family: var(--mono); font-size: 10px; line-height: 1.2; color: #2a1408; position: relative; padding-top: 24px; }
.toy .b img.bi { width: 100%; display: block; image-rendering: pixelated; mix-blend-mode: multiply; opacity: .92; }
.toy .b.new img.bi { animation: paint .7s steps(7) both; }
@keyframes paint { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.toy .b .hand { position: absolute; top: 0; left: 50%; width: 22px; transform: translateX(-50%); image-rendering: pixelated; mix-blend-mode: multiply; display: none; }
.toy .b.latest .hand { display: block; }
.toy .ctl { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.toy .ctl button { font-family: var(--mono); font-size: 15px; font-weight: 700; border: 0; border-radius: 7px; padding: 10px 16px; cursor: pointer; background: #1a100b; color: #ffe9c4; -webkit-tap-highlight-color: transparent; }
.toy .ctl button:hover { background: var(--ochre); color: #fff; }
.toy .ctl button.nope { animation: nope .35s; }
@keyframes nope { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.toy .out { margin-top: 12px; background: rgba(13, 8, 6, .88); border-radius: 7px; padding: 10px 12px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: #ead9bd; min-height: 42px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* the sign over the door */
.sign { position: relative; width: min(300px, 78%); margin: 6px auto 20px; }
.sign img { display: block; width: 100%; image-rendering: pixelated; }
.sign span { position: absolute; left: 12%; right: 12%; top: 13%; height: 44%; display: flex; align-items: center; justify-content: center; text-align: center; font-family: var(--fat); font-size: clamp(22px, 7vw, 31px); line-height: 1.02; color: #4d3a2c; text-shadow: 0 1px 0 rgba(255, 255, 255, .28); letter-spacing: .01em; }

.four { margin: 24px 0; display: grid; gap: 8px; }
.four .r { display: grid; grid-template-columns: 62px 1fr; gap: 4px 14px; align-items: center; background: var(--slab); border-radius: var(--r); padding: 14px 16px; }
.four .r img { width: 54px; height: 54px; object-fit: contain; image-rendering: pixelated; grid-row: span 3; }
.four .r b { font-family: var(--fat); font-weight: 400; font-size: 22px; color: #fff3dc; line-height: 1.1; }
.four .r .q { color: #ffe9c4; font-size: 16px; line-height: 1.35; }
.four .r .f { color: var(--dim); font-size: 14.5px; line-height: 1.35; }

.card { background: var(--paper); color: var(--paper-ink); border-radius: 8px; padding: 22px 20px 18px; margin: 26px auto; max-width: 520px; transform: rotate(-1.2deg); font-family: var(--mono); font-size: 13.5px; line-height: 1.5; }
.card h3 { font-family: var(--fat); font-size: 25px; margin: 0 0 12px; color: var(--paper-ink); }
.card dl { display: grid; gap: 9px; }
.card dt { font-weight: 700; white-space: nowrap; overflow-x: auto; }
.card dd { font-family: var(--sans); font-size: 14.5px; color: #6a4a34; margin-top: -1px; }
.card .ft { margin-top: 14px; font-family: var(--sans); font-size: 12.5px; color: #8a6a50; }

.dawn { padding: 0; }
.dawn .art { display: block; width: 100%; height: auto; max-height: 84vh; object-fit: cover; object-position: 50% 50%; image-rendering: pixelated; }
.end { background: linear-gradient(var(--bg), #2a1a16 60%, #3c2420); }
.end .big { font-family: var(--fat); font-size: clamp(22px, 6vw, 30px); line-height: 1.25; color: #ffe9c4; margin: 18px 0; }
footer { background: #3c2420; padding: 30px 0 46px; font-size: 14px; color: #d8bfa0; }
footer .term { margin: 14px 0 18px; background: #24140f; }
footer a { text-decoration-color: var(--fire); }
footer p { margin-bottom: .6em; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .p.glowy img, .ember, .toy .b.new img.bi { animation: none; } .dark, .glow { display: none; } }
