/* BlocksHeaven website. The page is a slice through the world: sky, then grass, dirt, stone, deep stone and bedrock as you scroll down. */
@font-face { font-family: 'Pixelify Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/pixelify-sans-latin-600-normal.woff2) format('woff2'); 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: 'Pixelify Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/pixelify-sans-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Pixelify Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/pixelify-sans-latin-700-normal.woff2) format('woff2'); 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: 'Pixelify Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/pixelify-sans-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format('woff2'); 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: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format('woff2'); 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: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --sky-ink: #123a63;        /* text on the sky */
  --grass: #5f9135; --grass-hi: #92c85c; --grass-lo: #3a5a1f;
  --dirt: #3b2818;           /* the dirt layer, in shadow */
  --stone: #3d3b38;
  --deep: #26262c;
  --bedrock: #141316;
  --ore: #eab84f;            /* gold ore: links and the one bright accent underground */
  --bone: #f4efe3;
  --dim: #d6ccba;
  --edge: #0d0906;
  --display: 'Pixelify Sans', 'Trebuchet MS', system-ui, sans-serif;
  --text: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
  --tile: 64px;              /* one block on screen */
  color-scheme: dark;
}
@media (max-width: 700px) { :root { --tile: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bedrock); color: var(--bone); font: 400 1.125rem/1.55 var(--text); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ore); text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:focus-visible, .play:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--bone); color: var(--bedrock); padding: 0.5rem 1rem; font-weight: 700; }
.skip:focus { top: 12px; }

h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: 0.01em; }
h2 { font-size: clamp(2.2rem, 1.4rem + 3.2vw, 3.6rem); line-height: 1.02; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.45); }
h3 { font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.85rem); line-height: 1.1; font-weight: 600; }
p { margin: 0; }
.wrap { width: min(1120px, 100% - 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; }
.lead { max-width: 58ch; margin-top: 1rem; font-size: 1.2rem; color: var(--dim); }

/* ---- the sky */
.hero { position: relative; min-height: min(100svh, 980px); display: grid; isolation: isolate; overflow: hidden; background: #8cc2f2; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg { z-index: -2; }
.hero-bg img { object-fit: cover; object-position: 50% 100%; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(150, 200, 245, 0.5) 0%, rgba(150, 200, 245, 0.15) 40%, rgba(150, 200, 245, 0) 55%); }
.hero-inner { align-self: start; justify-self: center; text-align: center; padding: clamp(20px, 4.5vh, 64px) 16px calc(var(--tile) * 3 + 16px); display: flex; flex-direction: column; align-items: center; }   /* (the bottom padding clears the grass blocks, also on a phone on its side) */
.logo { width: min(720px, 90vw, 64vh); filter: drop-shadow(0 10px 18px rgba(20, 50, 90, 0.18)); }
.logo canvas, .logo img { width: 100%; height: auto; display: block; }
.tagline { margin-top: clamp(10px, 2vh, 22px); font: 600 clamp(1.25rem, 0.95rem + 1.3vw, 1.9rem)/1.2 var(--display); color: var(--sky-ink); max-width: 26ch; text-shadow: 0 2px 0 rgba(255, 255, 255, 0.45); }
.hero-note { margin-top: 1.1rem; padding: 0.3rem 0.85rem 0.35rem; font-size: 1.05rem; font-weight: 700; color: var(--sky-ink); background: rgba(236, 246, 255, 0.86); box-shadow: 0 0 0 2px rgba(18, 58, 99, 0.25); }

/* the big button: a chunky grass-green block that presses down, like the game's own buttons */
.play {
  margin-top: clamp(18px, 3.2vh, 34px); display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 2.1rem 1.05rem; font: 700 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1 var(--display); color: var(--bone); text-decoration: none;
  background: var(--grass); text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 4px 0 var(--grass-hi), inset 0 -6px 0 var(--grass-lo), 0 0 0 3px var(--edge), 0 6px 0 3px rgba(0, 0, 0, 0.3);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
}
.play-ic { width: 1em; height: 1em; }
.play:hover { filter: brightness(1.1); }
.play:active { transform: translateY(5px); box-shadow: inset 0 3px 0 var(--grass-lo), 0 0 0 3px var(--edge), 0 1px 0 3px rgba(0, 0, 0, 0.3); }

/* ---- the layers. Each texture is a real block from the game, darker the deeper it is */
.edge { height: calc(var(--tile) * 3); background-repeat: repeat-x; background-size: auto 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.edge-grass { position: absolute; left: 0; right: 0; bottom: 0; background-image: url(img/tiles/edge-grass.png); background-position: bottom left; }
.edge-stone { background-image: url(img/tiles/edge-stone.png); }
.edge-deep { background-image: url(img/tiles/edge-deep.png); }
.edge-bedrock { background-image: url(img/tiles/edge-bedrock.png); }
.layer { background-size: calc(var(--tile) * 12) calc(var(--tile) * 12); image-rendering: pixelated; image-rendering: crisp-edges; padding: clamp(24px, 4vw, 48px) 0 clamp(40px, 6vw, 72px); }
.layer > * { image-rendering: auto; }
.dirt { background-color: var(--dirt); background-image: url(img/tiles/dirt.png); }
.stone { background-color: var(--stone); background-image: url(img/tiles/stone.png); }
.deep { background-color: var(--deep); background-image: url(img/tiles/deepstone.png); }
.bedrock { background-color: var(--bedrock); background-image: url(img/tiles/bedrock.png); padding-bottom: 0; }
.layer h2 + .lead, .layer h2 + .modes { margin-top: 1.1rem; }

/* screenshots sit in thick dark frames, like the slots in the game's bag */
.frame { margin: 0; position: relative; background: var(--edge); padding: 6px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), 0 8px 0 rgba(0, 0, 0, 0.35); }
.frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.frame figcaption { position: absolute; left: 6px; bottom: 6px; padding: 0.35rem 0.75rem 0.45rem; background: rgba(13, 9, 6, 0.86); font: 600 1.02rem/1.2 var(--display); color: var(--bone); }

.gallery { margin-top: clamp(24px, 3vw, 36px); display: grid; gap: clamp(12px, 1.6vw, 20px); grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; }
.gallery .big { grid-row: span 2; }
.gallery .big img { height: 100%; aspect-ratio: auto; min-height: 100%; }
.gallery .big picture { display: block; height: 100%; }

.panel { background: rgba(18, 12, 8, 0.9); padding: clamp(20px, 2.6vw, 32px); box-shadow: 0 0 0 3px var(--edge), inset 0 3px 0 rgba(255, 255, 255, 0.06), 0 8px 0 3px rgba(0, 0, 0, 0.3); }
.panel p { margin-top: 0.9rem; color: var(--dim); max-width: 60ch; }
.split { margin-top: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 32px); align-items: center; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
.mode h3 { margin-top: 1.3rem; display: flex; align-items: center; gap: 0.6rem; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.45); }
.mode p { margin-top: 0.6rem; color: var(--dim); max-width: 52ch; }
.mode-ic { width: 1.1em; height: 1.1em; flex: none; background-size: 100% 100%; image-rendering: pixelated; }
.mode-ic.heart { background-image: url(img/heart.png); }
.mode-ic.star { background-image: url(img/star.png); }

.caves { margin-top: clamp(24px, 3vw, 36px); display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 20px); }

.parents { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(20px, 4vw, 56px); align-items: start; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.facts li { position: relative; padding-left: 2.1rem; color: var(--dim); }
.facts li::before { content: ''; position: absolute; left: 0; top: 0.32em; width: 1.05rem; height: 1.05rem; background: url(img/tiles/emerald.png) center / 100% 100%; image-rendering: pixelated; box-shadow: 0 0 0 2px var(--edge); }
.facts b { color: var(--bone); }
.final { margin-top: clamp(48px, 7vw, 88px); display: flex; flex-direction: column; align-items: center; text-align: center; }
.final .play { margin-top: 0; }
.final-note { margin-top: 1.2rem; color: var(--dim); }
.foot { margin-top: clamp(48px, 7vw, 80px); padding: 22px clamp(16px, 4vw, 40px) calc(22px + env(safe-area-inset-bottom, 0px)); background: rgba(0, 0, 0, 0.55); display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: center; font-size: 0.95rem; color: var(--dim); }

/* ---- small screens */
@media (max-width: 860px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .big { grid-column: span 2; grid-row: auto; }
  .gallery .big img { aspect-ratio: 16 / 9; height: auto; }
  .split, .modes, .parents { grid-template-columns: 1fr; }
  .caves { grid-template-columns: 1fr 1fr; }
  .caves .frame:last-child { grid-column: span 2; }
}
@media (max-width: 560px) {
  body { font-size: 1.0625rem; }
  .gallery, .caves { grid-template-columns: 1fr; }
  .gallery .big, .caves .frame:last-child { grid-column: auto; }
  .hero { min-height: 88svh; }
  .hero-bg img { object-position: 47% 100%; }
  .frame figcaption { font-size: 0.92rem; }
  .hero-note { font-size: 0.95rem; }
}

/* ---- the privacy page */
.doc { background: var(--dirt) url(img/tiles/dirt.png); background-size: calc(var(--tile) * 12) calc(var(--tile) * 12); image-rendering: pixelated; min-height: 100vh; padding: clamp(24px, 5vw, 64px) 0; }
.doc .panel { image-rendering: auto; width: min(760px, 100% - 32px); margin: 0 auto; }
.doc h1 { font: 700 clamp(2rem, 1.5rem + 2vw, 2.8rem)/1.05 var(--display); margin: 0.6rem 0 0; }
.doc h2 { font-size: 1.5rem; margin-top: 2rem; text-shadow: none; }
.doc p, .doc li { color: var(--dim); }
.doc p { margin-top: 0.8rem; }
.doc ul { padding-left: 1.2rem; }
.doc .back { font-weight: 700; }
.doc .home-logo { width: 200px; }

/* ---- things the admin panel can switch on: the banner, news, the download button, the message form */
.banner { position: relative; z-index: 2; padding: 0.7rem 16px 0.8rem; text-align: center; font-weight: 700; color: var(--sky-ink); background: #cfe7fb; box-shadow: inset 0 -3px 0 rgba(18, 58, 99, 0.22); }
.banner.important { background: var(--ore); color: #2a1d06; box-shadow: inset 0 -3px 0 rgba(80, 52, 6, 0.35); }
.banner p { max-width: 70ch; margin: 0 auto; }
.banner a { color: inherit; text-decoration-thickness: 2px; }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 18px; align-items: stretch; }
.hero .ctas { margin-top: clamp(18px, 3.2vh, 34px); }
.ctas .play { margin-top: 0; }
.play.dl { background: #6e6a63; box-shadow: inset 0 4px 0 #a8a297, inset 0 -6px 0 #45413c, 0 0 0 3px var(--edge), 0 6px 0 3px rgba(0, 0, 0, 0.3); font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem); }
.play.dl:active { box-shadow: inset 0 3px 0 #45413c, 0 0 0 3px var(--edge), 0 1px 0 3px rgba(0, 0, 0, 0.3); }
.news { margin-bottom: clamp(40px, 6vw, 64px); }
.news-list { margin-top: 1.1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(14px, 2vw, 22px); }
.news-item h3 { margin-top: 0.35rem; }
.news-item p { margin-top: 0.7rem; color: var(--dim); }
.news-date { color: var(--ore); font: 600 1rem/1.2 var(--display); }
.privacy-link { margin-top: 1rem; font-weight: 700; }
.contact { margin-top: clamp(48px, 7vw, 80px); }
.contact .panel { max-width: 860px; }
.contact h2 { text-shadow: none; }
.contact-lead { margin-top: 0.8rem; color: var(--dim); max-width: 62ch; }
.msg-form { margin-top: 1.4rem; display: grid; gap: 1.1rem; }
.kinds { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.kinds legend { font-weight: 700; margin-bottom: 0.6rem; padding: 0; }
.kinds label { cursor: pointer; }
.kinds input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kinds span { display: inline-block; padding: 0.45rem 0.9rem 0.5rem; font: 600 1rem/1.1 var(--display); color: var(--dim); background: #2b2119; box-shadow: 0 0 0 2px var(--edge), inset 0 2px 0 rgba(255, 255, 255, 0.07); }
.kinds input:checked + span { background: var(--grass); color: var(--bone); box-shadow: 0 0 0 2px var(--edge), inset 0 3px 0 var(--grass-hi), inset 0 -4px 0 var(--grass-lo); }
.kinds input:focus-visible + span { outline: 3px solid #fff; outline-offset: 3px; }
.msg-form .field { display: grid; gap: 0.4rem; font-weight: 700; }
.msg-form .field small { font-weight: 400; color: var(--dim); }
.msg-form textarea, .msg-form input[type=text], .msg-form input[type=email] { width: 100%; font: 400 1.05rem/1.45 var(--text); color: var(--bone); background: #0f0b08; border: 2px solid #4a3a2c; padding: 0.65rem 0.8rem; border-radius: 0; }
.msg-form textarea:focus, .msg-form input:focus { outline: none; border-color: var(--grass-hi); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: end; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.4rem; }
.play.send { margin-top: 0; font-size: 1.35rem; border: 0; cursor: pointer; }
.play.send[disabled] { filter: grayscale(0.4) brightness(0.85); cursor: wait; }
.form-status { font-weight: 700; color: var(--dim); max-width: 46ch; }
.form-status.ok { color: var(--grass-hi); }
.form-status.bad { color: #ff9f86; }
@media (max-width: 700px) { .field-row { grid-template-columns: 1fr; } }
.soon .panel { text-align: center; }
.soon .home-logo { margin: 0 auto; width: 240px; }
