/* Deep Shaft: playdeepshaft.com
   Look: the game's own. Anton (the store logo's face) for display, Barlow Condensed (the HUD's face) for text,
   IBM Plex Mono for numbers. Amber from the logo, the HUD's orange as the action colour, layer colours from the
   game's materials (World/Mats.cs). The page is the shaft: the gauge on the left reads the depth as you scroll. */

@font-face { font-family: "Anton"; src: url("fonts/anton.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plexmono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #0c0907;
  --bg2: #15100c;
  --ink: #f4ecdc;
  --mute: #b3a48e;
  --dim: #7d705f;
  --line: rgba(244, 236, 220, .12);
  --line2: rgba(244, 236, 220, .22);
  --amber: #f8c038;
  --amber2: #f09018;
  --hot: #e07038;
  --hot2: #c9552a;
  --wrap: 1240px;
  --bar: 64px;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --text: "Barlow", "Arial Narrow", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 500 19px/1.5 var(--text); letter-spacing: .005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--hot); color: #160b05; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--amber); color: #120c05; padding: 8px 14px; font-weight: 600; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- type ---------- */
.display { font: 400 clamp(56px, 9.2vw, 132px)/.92 var(--display); text-transform: uppercase; letter-spacing: .005em; margin: 0 0 22px; text-shadow: 0 4px 30px rgba(0,0,0,.55); }
.display.small { font-size: clamp(48px, 7vw, 96px); }
.h2 { font: 400 clamp(38px, 5vw, 64px)/1 var(--display); text-transform: uppercase; margin: 0 0 18px; letter-spacing: .01em; }
.kicker { font: 600 13px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--amber); margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 0 4px rgba(224,112,56,.22); animation: pulse 2.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(224,112,56,0); } }
.lead { font-size: clamp(19px, 1.7vw, 22px); color: #e6dccb; max-width: 40em; margin: 0 0 8px; }
p { margin: 0 0 16px; }
.txt p { color: #ddd2bf; }
.label { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--mute); }

/* ---------- buttons ---------- */
.primary, .ghost {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 18px;
  font: 400 21px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; text-decoration: none;
  padding: 18px 22px; border: 0; cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: background .15s, color .15s, transform .15s;
}
.primary { background: linear-gradient(180deg, var(--amber), var(--amber2)); color: #1a0f04; }
.primary:hover { background: linear-gradient(180deg, #ffd256, #ff9f22); transform: translateY(-1px); }
.primary .arr { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: square; }
.primary.small { font-size: 15px; padding: 11px 16px; }
.ghost { background: rgba(12,9,7,.55); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); font-size: 16px; padding: 14px 18px; backdrop-filter: blur(4px); }
.ghost:hover { background: rgba(244,236,220,.1); }
.ghost .pl { display: inline-flex; align-items: center; gap: 10px; }
.ghost svg { width: 14px; height: 14px; fill: var(--amber); }
.ghost .len { font: 600 12px var(--mono); color: var(--mute); letter-spacing: .08em; }

/* ---------- header ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--bar); background: linear-gradient(180deg, rgba(12,9,7,.92), rgba(12,9,7,.7)); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand img { height: 40px; width: auto; }
.tabs { display: flex; gap: 4px; flex: 1; justify-content: center; }
.tabs a { font: 600 15px/1 var(--text); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); text-decoration: none; padding: 10px 10px; position: relative; }
.tabs a:hover, .tabs a.on { color: var(--ink); }
.tabs a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; background: var(--hot); }
.bar-end { display: flex; align-items: center; gap: 16px; }
@media (max-width: 1180px) { .tabs { display: none; } .bar .wrap { justify-content: space-between; } }
@media (max-width: 520px) { .bar-end .label { display: none; } .brand img { height: 32px; } }

/* ---------- depth gauge ---------- */
.gauge { position: fixed; left: 24px; top: calc(var(--bar) + 26px); bottom: 26px; width: 118px; z-index: 40; display: none; flex-direction: column; pointer-events: none; opacity: 0; transition: opacity .4s; }
.gauge.on { opacity: 1; }
@media (min-width: 1460px) { .js .gauge { display: flex; } }
.g-read { font: 600 22px/1 var(--mono); color: var(--ink); display: flex; align-items: baseline; gap: 4px; }
.g-read .g-num::before { content: "−"; color: var(--hot); }
.g-read .g-num.zero::before { content: ""; }
.g-unit { font-size: 13px; color: var(--mute); }
.g-layer { font: 600 13px/1.2 var(--text); text-transform: uppercase; letter-spacing: .1em; color: var(--amber); margin-top: 6px; min-height: 16px; }
.g-real { font: 600 10px/1.3 var(--mono); color: var(--dim); letter-spacing: .04em; margin: 4px 0 14px; min-height: 13px; }
.g-track { position: relative; flex: 1; width: 6px; margin-left: 2px; background: rgba(244,236,220,.06); }
.g-ticks { position: absolute; inset: 0; }
.g-ticks i { position: absolute; left: 0; width: 6px; background: var(--c); opacity: .6; }
.g-ticks i::after { content: attr(data-n); position: absolute; left: 16px; top: 0; font: 600 10px/1 var(--mono); color: #9a8b76; white-space: nowrap; letter-spacing: .06em; text-transform: uppercase; }
.g-fill { position: absolute; left: 0; right: 0; top: 0; height: 0; background: linear-gradient(180deg, var(--amber), var(--hot)); box-shadow: 0 0 12px rgba(240,144,24,.5); }
.g-cage { position: absolute; left: -5px; width: 16px; height: 10px; top: 0; transform: translateY(-50%); background: var(--ink); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); box-shadow: 0 0 0 2px var(--bg); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: max(640px, 100svh); display: flex; align-items: flex-end; padding: calc(var(--bar) + 60px) 0 96px; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; transform: scale(1.04); animation: drift 26s ease-out forwards; }
@keyframes drift { to { transform: scale(1.0); } }
@media (prefers-reduced-motion: reduce) { .hero-bg img { animation: none; transform: none; } }
.hero-bg::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(12,9,7,.94) 0%, rgba(12,9,7,.72) 34%, rgba(12,9,7,.12) 64%, rgba(12,9,7,.25) 100%),
  linear-gradient(0deg, var(--bg) 0%, rgba(12,9,7,0) 34%); }
.hero-in { display: grid; grid-template-columns: 1.35fr minmax(300px, .65fr); gap: 48px; align-items: end; }
.hero-copy .lead { max-width: 30em; }
.hero-act { display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 18px; background: rgba(12,9,7,.62); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px var(--line); }
.facts { margin: 0 0 8px; border-top: 1px solid var(--line2); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 600 11px/1.6 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--mute); }
.facts dd { margin: 0; font: 600 16px/1.3 var(--text); text-transform: uppercase; letter-spacing: .06em; text-align: right; }
.ground-line { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; background:
  repeating-linear-gradient(90deg, #4b6a2a 0 3px, #3c5a22 3px 7px, #557633 7px 9px); }
.ground-line::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 18px; background: linear-gradient(180deg, #3a2b1d, rgba(58,43,29,0)); }
.ground-line span { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); }
@media (max-width: 900px) {
  .hero { align-items: flex-end; padding-bottom: 72px; }
  .hero-in { grid-template-columns: 1fr; gap: 28px; }
  .hero-bg img { object-position: 50% 30%; }
  .hero-bg::after { background: linear-gradient(0deg, var(--bg) 8%, rgba(12,9,7,.78) 52%, rgba(12,9,7,.25) 100%); }
}

/* ---------- sections = layers ---------- */
.sec { position: relative; padding: 120px 0; background: linear-gradient(180deg, var(--tint, var(--bg2)) 0%, var(--bg) 78%); }
/* each layer starts with a band of its own rock (the colours of World/Mats.cs), its top edge broken */
.sec::before, .final::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; z-index: 2; background: var(--band, transparent);
  -webkit-mask: linear-gradient(#000, #000) 0 5px / 100% 7px no-repeat, radial-gradient(9px 6px at 50% 100%, #000 98%, transparent) 0 0 / 23px 6px repeat-x;
          mask: linear-gradient(#000, #000) 0 5px / 100% 7px no-repeat, radial-gradient(9px 6px at 50% 100%, #000 98%, transparent) 0 0 / 23px 6px repeat-x; }
.sec::after, .final::after { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 120px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--band, transparent) 22%, transparent), transparent); }
#caves::after { display: none; }
.sec-head { max-width: 760px; margin-bottom: 40px; }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.split.rev .txt { order: 2; }
@media (max-width: 900px) { .sec { padding: 84px 0; } .split { grid-template-columns: 1fr; gap: 36px; } .split.rev .txt { order: 0; } }

.shot { margin: 0; position: relative; background: #000; overflow: hidden; }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s ease; }
.shot::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(244,236,220,.1); pointer-events: none; }
.pics { position: relative; padding-bottom: 14%; }
.pics .big { box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); }
.pics .inset { position: absolute; width: 48%; right: -4%; bottom: 0; box-shadow: 0 20px 50px rgba(0,0,0,.75), 0 0 0 6px var(--bg); }
@media (max-width: 900px) { .pics .inset { right: 0; } }

.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ticks li { padding-left: 26px; position: relative; color: #ddd2bf; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 3px; background: var(--hot); }
.ticks b { color: var(--ink); font-weight: 600; }

.mosaic { display: grid; grid-template-columns: 1.5fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; }
.mosaic .m1 { grid-row: 1 / 3; }
.mosaic .m1 img { height: 100%; aspect-ratio: auto; }
@media (max-width: 760px) { .mosaic { grid-template-columns: 1fr; grid-template-rows: none; } .mosaic .m1 { grid-row: auto; } .mosaic .m1 img { aspect-ratio: 16/9; } }
.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: 600 14px/1 var(--text); text-transform: uppercase; letter-spacing: .08em; padding: 10px 13px; border: 1px solid var(--line2); background: rgba(12,9,7,.4); }
.chips li::before { content: "▪"; color: var(--amber2); margin-right: 8px; }

.rules { margin: 24px 0 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.rules div { background: rgba(20,12,9,.92); padding: 16px 18px; }
.rules dt { font: 400 22px/1 var(--display); text-transform: uppercase; color: var(--amber); margin-bottom: 6px; letter-spacing: .02em; }
.rules dd { margin: 0; font-size: 17px; color: #d8ccb8; line-height: 1.4; }
.say { font: 400 24px/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; color: var(--ink); }
@media (max-width: 480px) { .rules { grid-template-columns: 1fr; } }

/* caves: the picture is the section */
#caves { padding: 0; min-height: min(92vh, 900px); display: flex; align-items: flex-end; overflow: hidden; background: #0b0d10; }
.cave-bg { position: absolute; inset: 0; }
.cave-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.cave-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,9,11,.92) 0%, rgba(8,9,11,.55) 42%, rgba(8,9,11,0) 70%), linear-gradient(0deg, var(--bg) 0%, rgba(8,9,11,0) 30%), linear-gradient(180deg, #22262c 0%, rgba(8,9,11,0) 22%); }
.cave-in { position: relative; padding: 140px 0 110px; }
.cave-in .txt { max-width: 520px; }
@media (max-width: 900px) { .cave-bg::after { background: linear-gradient(0deg, var(--bg) 10%, rgba(8,9,11,.82) 55%, rgba(8,9,11,.3) 100%); } }

.facts.inline { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 0; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 26px; }
.facts.inline div { display: block; padding: 14px 16px; border: 0; background: rgba(20,16,15,.95); }
.facts.inline dd { text-align: left; margin-top: 4px; font-size: 18px; }

/* the cross-section */
.strata { list-style: none; padding: 0; margin: 0; display: grid; border: 1px solid var(--line2); }
.strata li { --u: .36px; position: relative; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 24px;
  min-height: max(46px, calc(var(--h) * var(--u))); padding: 0 22px 0 30px; border-top: 1px solid rgba(0,0,0,.35);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 82%, #000) 0 10px, color-mix(in srgb, var(--c) 30%, #0c0907) 10px); }
.strata li:first-child { border-top: 0; }
.strata b { font: 400 clamp(22px, 2.4vw, 30px)/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.strata .d { font: 600 14px var(--mono); color: var(--ink); }
.strata .r { font: 600 12px var(--mono); color: var(--mute); min-width: 150px; text-align: right; }
.strata li.core { background: radial-gradient(ellipse at 50% 120%, #ffcf5a 0%, #f09018 30%, #9a3410 70%, #3d130a 100%); color: #1b0b03; }
.strata li.core .d, .strata li.core .r { color: #2a1206; }
@media (max-width: 640px) { .strata li { grid-template-columns: 1fr auto; padding: 10px 16px 10px 24px; gap: 4px 12px; } .strata .r { grid-column: 1 / -1; text-align: left; } }

/* media */
.trailer { display: block; position: relative; width: 100%; padding: 0; border: 0; cursor: pointer; background: #000; overflow: hidden; margin-bottom: 12px; }
.trailer img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .82; transition: opacity .3s, transform .6s; }
.trailer:hover img { opacity: 1; transform: scale(1.015); }
.trailer .play { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; transform: translate(-50%, -50%); display: grid; place-items: center;
  background: linear-gradient(180deg, var(--amber), var(--amber2)); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%); }
.trailer .play svg { width: 38px; height: 38px; fill: #1a0f04; margin-left: 6px; }
.trailer .cap { position: absolute; left: 20px; bottom: 16px; font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); text-shadow: 0 1px 6px #000; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery a { display: block; overflow: hidden; background: #000; position: relative; }
.gallery img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform .5s, opacity .3s; opacity: .9; }
.gallery a:hover img { transform: scale(1.05); opacity: 1; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* the core */
.final { position: relative; padding: 150px 0 140px; text-align: center; overflow: hidden; --tint: #1c1210; background: #120a07; }
.core-glow { position: absolute; left: 50%; bottom: -55%; width: 1500px; height: 1000px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, #ffd56b 0%, #f39a1c 18%, #c8461a 40%, rgba(110,30,12,.55) 62%, rgba(18,10,7,0) 100%); filter: blur(6px); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateX(-50%) scale(1.04); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .core-glow { animation: none; } }
.final-in { position: relative; display: flex; flex-direction: column; align-items: center; }
.final .kicker { justify-content: center; }
.final .lead { margin-bottom: 30px; }
.steam-widget { width: min(646px, 100%); margin: 0 0 22px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.steam-widget iframe { display: block; width: 100%; height: 190px; border: 0; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 48px 0 56px; background: var(--bg); }
.foot .wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: start; }
.f-brand img { width: 170px; margin-bottom: 10px; }
.f-brand p { color: var(--mute); font-size: 16px; margin: 0; }
.f-brand p a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.f-brand p a:hover { color: var(--amber); text-decoration-color: currentColor; }
.f-links { display: grid; gap: 8px; justify-items: end; }
.f-links a { font: 600 15px var(--text); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); text-decoration: none; }
.f-links a:hover { color: var(--amber); }
.f-small { grid-column: 1 / -1; color: var(--dim); font-size: 14px; margin: 12px 0 0; }
@media (max-width: 700px) { .foot .wrap { grid-template-columns: 1fr; } .f-links { justify-items: start; } }

/* reveal on scroll */
.js .rise { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .rise { opacity: 1; transform: none; transition: none; } }

/* modal */
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(6,4,3,.94); display: grid; place-items: center; padding: 56px 72px; }
.modal[hidden] { display: none; }
.m-body { width: min(1600px, 100%); max-height: 100%; display: grid; place-items: center; }
.m-body video, .m-body img { width: 100%; max-height: calc(100vh - 112px); object-fit: contain; background: #000; }
.modal button { position: absolute; background: none; border: 0; color: var(--ink); cursor: pointer; font: 400 44px/1 var(--text); padding: 10px 16px; opacity: .8; }
.modal button:hover { opacity: 1; color: var(--amber); }
.m-close { top: 8px; right: 12px; }
.m-prev { left: 8px; top: 50%; transform: translateY(-50%); font-size: 64px !important; }
.m-next { right: 8px; top: 50%; transform: translateY(-50%); font-size: 64px !important; }
.modal.video .m-prev, .modal.video .m-next { display: none; }
@media (max-width: 700px) { .modal { padding: 56px 8px; } .m-prev, .m-next { top: auto !important; bottom: 4px; transform: none !important; } }
.sec > .wrap, .final > .wrap { position: relative; z-index: 3; }
