/* spanish.hbpn.tv: a world of blocks like the videos' own. A bright sky with blocky clouds, a strip of
   grass, and the stories on a ground of earth, each in a chunky block that lifts when touched. The
   titles are fat and golden with a deep edge, as on the covers. Every texture here is our own pixel art. */

@font-face { font-family: 'Luckiest Guy'; src: url('/assets/fonts/luckiest-guy-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/assets/fonts/fredoka-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/assets/fonts/fredoka-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Pixelify Sans'; src: url('/assets/fonts/pixelify-sans-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
	--sky-top: #3f9fe8;
	--sky-low: #9fd8ff;
	--ink: #2b1a0c;
	--paper: #fff7e2;
	--paper-dark: #f3e3bd;
	--text: #3d2a16;
	--gold: #ffd23f;
	--orange: #f08c12;
	--edge: #6b3206;
	--leaf: #5bb236;
	--leaf-dark: #3d8a1f;
	--ruby: #e62117;
	--ruby-dark: #9e130c;
	--title: 'Luckiest Guy', 'Arial Black', system-ui, sans-serif;
	--body: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
	--pixel: 'Pixelify Sans', 'Courier New', monospace;
	--dirt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Crect width='8' height='8' fill='%23866043'/%3E%3Cg fill='%236b4a31'%3E%3Crect x='1' y='0' width='1' height='1'/%3E%3Crect x='3' y='2' width='1' height='1'/%3E%3Crect x='4' y='5' width='1' height='1'/%3E%3Crect x='6' y='7' width='1' height='1'/%3E%3C/g%3E%3Cg fill='%239c7552'%3E%3Crect x='5' y='1' width='1' height='1'/%3E%3Crect x='7' y='3' width='1' height='1'/%3E%3Crect x='0' y='4' width='1' height='1'/%3E%3Crect x='2' y='6' width='1' height='1'/%3E%3C/g%3E%3Cg fill='%235d3f2a'%3E%3Crect x='6' y='2' width='1' height='1'/%3E%3Crect x='1' y='5' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E");
	--grass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 4' shape-rendering='crispEdges'%3E%3Crect width='8' height='4' fill='%23866043'/%3E%3Crect width='8' height='2' fill='%236cc644'/%3E%3Crect x='0' y='2' width='2' height='1' fill='%236cc644'/%3E%3Crect x='3' y='2' width='2' height='1' fill='%235bb236'/%3E%3Crect x='6' y='2' width='1' height='1' fill='%236cc644'/%3E%3Crect x='1' y='3' width='1' height='1' fill='%235bb236'/%3E%3Crect x='4' y='3' width='1' height='1' fill='%236cc644'/%3E%3Crect x='2' y='0' width='1' height='1' fill='%2384d95a'/%3E%3Crect x='5' y='1' width='1' height='1' fill='%234f9e2c'/%3E%3Crect x='7' y='0' width='1' height='1' fill='%234f9e2c'/%3E%3C/svg%3E");
	--stone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Crect width='8' height='8' fill='%23585858'/%3E%3Cg fill='%23404040'%3E%3Crect x='0' y='1' width='2' height='1'/%3E%3Crect x='5' y='3' width='2' height='1'/%3E%3Crect x='2' y='6' width='2' height='1'/%3E%3C/g%3E%3Cg fill='%23707070'%3E%3Crect x='3' y='0' width='1' height='1'/%3E%3Crect x='6' y='5' width='1' height='1'/%3E%3Crect x='0' y='7' width='1' height='1'/%3E%3C/g%3E%3Cg fill='%232e2e2e'%3E%3Crect x='7' y='1' width='1' height='1'/%3E%3Crect x='1' y='4' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { background: #5d3f2a; }
body { margin: 0; font: 500 1.0625rem/1.6 var(--body); color: var(--text); background: #5d3f2a; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }
.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }

/* The sky. */
.sky { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--sky-top), var(--sky-low) 85%); color: #fff; }
.bar { position: relative; z-index: 1; width: min(72rem, 100% - 2rem); margin: 0 auto; padding: 1rem 0; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; font: 1.35rem/1 var(--title); letter-spacing: 0.02em; text-transform: uppercase; color: #fff; -webkit-text-stroke: 0.08em var(--edge); paint-order: stroke fill; text-shadow: 0 3px 0 var(--edge); }
.brand img { image-rendering: pixelated; filter: drop-shadow(0 3px 0 rgb(0 0 0 / 0.3)); }

.clouds { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.clouds i { position: absolute; display: block; background: #fff; opacity: 0.7; animation: drift linear infinite; }
.clouds i::before, .clouds i::after { content: ''; position: absolute; background: #fff; }
.clouds i::after { background: #e3f2ff; }
.c1 { top: 18%; left: -10%; width: 9rem; height: 2.4rem; animation-duration: 90s; }
.c1::before { left: 1.6rem; top: -1.6rem; width: 4rem; height: 1.6rem; }
.c1::after { left: 0; bottom: 0; width: 100%; height: 0.6rem; }
.c2 { top: 52%; left: 30%; width: 12rem; height: 2.8rem; animation-duration: 120s; animation-delay: -60s; }
.c2::before { left: 3rem; top: -1.8rem; width: 5rem; height: 1.8rem; }
.c2::after { left: 0; bottom: 0; width: 100%; height: 0.7rem; }
.c3 { top: 12%; left: 62%; width: 7rem; height: 2rem; animation-duration: 100s; animation-delay: -30s; }
.c3::before { left: 1.2rem; top: -1.2rem; width: 3rem; height: 1.2rem; }
.c3::after { left: 0; bottom: 0; width: 100%; height: 0.5rem; }
.c4 { top: 70%; left: 80%; width: 10rem; height: 2.4rem; animation-duration: 140s; animation-delay: -100s; }
.c4::before { left: 4rem; top: -1.4rem; width: 4rem; height: 1.4rem; }
.c4::after { left: 0; bottom: 0; width: 100%; height: 0.6rem; }
@keyframes drift { from { transform: translateX(-30vw); } to { transform: translateX(130vw); } }

.hero { position: relative; z-index: 1; padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 4.5rem); text-align: center; }
/* The title font's own lower case looks odd, so titles are in capitals, as on the covers. */
.big-title { margin: 0; font: clamp(2.6rem, 8vw, 5.6rem)/0.95 var(--title); letter-spacing: 0.01em; text-transform: uppercase; color: var(--gold); -webkit-text-stroke: 0.06em var(--edge); paint-order: stroke fill; text-shadow: 0 0.06em 0 var(--orange), 0 0.11em 0 #c4620a, 0 0.16em 0 var(--edge), 0 0.25em 0.3em rgb(0 0 0 / 0.3); text-wrap: balance; }
/* White words over the sky keep a dark edge all round, so a passing cloud never hides them. */
.tagline, .crumbs { text-shadow: 2px 0 0 #1b4f7d, -2px 0 0 #1b4f7d, 0 2px 0 #1b4f7d, 0 -2px 0 #1b4f7d, 2px 2px 0 #1b4f7d, -2px 2px 0 #1b4f7d, 2px -2px 0 #1b4f7d, -2px -2px 0 #1b4f7d, 0 4px 0 #1b4f7d; }
.tagline { margin: 1.2rem auto 0; max-width: 34rem; font-size: clamp(1.1rem, 2.4vw, 1.4rem); font-weight: 700; color: #fff; text-wrap: balance; }
.count { margin: 1.4rem 0 0; display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.5rem 1rem; background: rgb(255 255 255 / 0.92); color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-weight: 700; }
.pixel { font-family: var(--pixel); font-size: 1.4em; color: var(--leaf-dark); }

.crumbs { position: relative; z-index: 1; padding: 0.5rem 0 2rem; font-weight: 700; color: #fff; }
.crumbs a { color: #fff; }

/* Grass on top of the earth. */
.grass { height: 32px; background: var(--grass) repeat-x left top / 64px 32px; image-rendering: pixelated; position: relative; z-index: 1; }
.dirt { background: linear-gradient(rgb(40 22 8 / 0.28), rgb(40 22 8 / 0.42)), var(--dirt) repeat left top / 64px 64px; image-rendering: pixelated; padding: 2.5rem 0 4rem; }
.dirt * { image-rendering: auto; }

.section-title { margin: 0 0 1.6rem; font: clamp(1.7rem, 4vw, 2.4rem)/1.05 var(--title); color: #fff; -webkit-text-stroke: 0.07em var(--ink); paint-order: stroke fill; text-shadow: 0 0.12em 0 var(--ink); letter-spacing: 0.02em; }

/* A story: one block. */
.stories { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; }
.story-link, .panel { display: block; background: var(--paper); border: 4px solid var(--ink); box-shadow: inset -6px -6px 0 var(--paper-dark), inset 6px 6px 0 #fffdf6, 8px 8px 0 var(--ink); }
.story-link { display: grid; grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); gap: clamp(1rem, 3vw, 2rem); align-items: center; padding: 1rem; text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.story-link:hover, .story-link:focus-visible { transform: translate(-3px, -3px); box-shadow: inset -6px -6px 0 var(--paper-dark), inset 6px 6px 0 #fffdf6, 11px 11px 0 var(--ink); }
.story-link:active { transform: translate(2px, 2px); box-shadow: inset -6px -6px 0 var(--paper-dark), inset 6px 6px 0 #fffdf6, 4px 4px 0 var(--ink); }
.story-cover { border: 4px solid var(--ink); background: #222; aspect-ratio: 16 / 9; overflow: hidden; }
.story-cover img, .watch-cover img, .mini img { width: 100%; height: 100%; object-fit: cover; }
.story-link:hover .story-cover img { transform: scale(1.04); }
.story-cover img { transition: transform 0.3s ease; }
.story-text { display: grid; gap: 0.7rem; padding-right: 0.5rem; }
.story-title { margin: 0; font: clamp(1.5rem, 2.8vw, 2.25rem)/1.05 var(--title); letter-spacing: 0.01em; text-transform: uppercase; color: var(--gold); -webkit-text-stroke: 0.07em var(--edge); paint-order: stroke fill; text-shadow: 0 0.07em 0 var(--orange), 0 0.13em 0 var(--edge); text-wrap: balance; }
.story-summary { margin: 0; font-size: 1.08rem; }
.story-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.7rem; margin-top: 0.2rem; }

.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.65rem; font: 700 0.98rem/1.4 var(--pixel); background: #ffe9a8; color: var(--ink); border: 3px solid var(--ink); }
.go { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem; font: 700 1.05rem/1 var(--pixel); color: #fff; text-decoration: none; text-shadow: 0 2px 0 var(--leaf-dark); background: var(--leaf); border: 3px solid var(--ink); box-shadow: inset 0 -5px 0 var(--leaf-dark), inset 0 4px 0 #84d95a; }
a.go:hover { filter: brightness(1.08); }

.about { margin-top: 3.5rem; padding: 1.6rem; background: rgb(255 247 226 / 0.95); border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.about .section-title { font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--gold); -webkit-text-stroke-color: var(--edge); text-shadow: 0 0.1em 0 var(--edge); }
.about p { margin: 0 0 0.8rem; max-width: 62ch; }
.empty { color: #fff; font-weight: 700; }

/* A story's own page. */
.watch { display: grid; gap: 2rem; }
.watch-cover { border: 5px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); aspect-ratio: 16 / 9; overflow: hidden; background: #222; max-width: 60rem; margin-inline: auto; width: 100%; }
.panel { padding: clamp(1.2rem, 4vw, 2.5rem); max-width: 60rem; margin-inline: auto; width: 100%; }
.watch-title { font-size: clamp(2rem, 5.5vw, 3.6rem); text-align: left; }
.chips { margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.panel p { margin: 0 0 1rem; max-width: 65ch; }
.panel .lead { font-size: 1.25rem; font-weight: 700; margin-top: 1.6rem; }
.youtube { display: inline-flex; align-items: center; gap: 0.9rem; margin-top: 1.6rem; padding: 1rem 1.5rem; font: 700 clamp(1.15rem, 2.6vw, 1.45rem)/1.15 var(--body); color: #fff; text-decoration: none; background: var(--ruby); border: 4px solid var(--ink); box-shadow: inset 0 -7px 0 var(--ruby-dark), inset 0 5px 0 #ff5a4f, 7px 7px 0 var(--ink); transition: transform 0.12s ease, box-shadow 0.12s ease; animation: nudge 2.6s ease-in-out 1.2s 2; }
.youtube:hover { transform: translate(-2px, -3px); box-shadow: inset 0 -7px 0 var(--ruby-dark), inset 0 5px 0 #ff5a4f, 10px 10px 0 var(--ink); }
.youtube:active { transform: translate(3px, 3px); box-shadow: inset 0 -7px 0 var(--ruby-dark), inset 0 5px 0 #ff5a4f, 3px 3px 0 var(--ink); }
.yt { flex: none; filter: drop-shadow(0 2px 0 rgb(0 0 0 / 0.3)); }
@keyframes nudge { 0%, 100% { transform: none; } 45% { transform: translateY(-5px); } 60% { transform: translateY(0); } 72% { transform: translateY(-2px); } }
.soon { margin-top: 1.4rem; font: 700 1.2rem var(--pixel); color: var(--leaf-dark); }
.tags { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li { padding: 0.15rem 0.6rem; font-size: 0.92rem; background: var(--paper-dark); border: 2px solid #b99c63; color: #5a4120; }

.more { margin-top: 3.5rem; }
.mini { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1.4rem; }
.mini a { display: grid; gap: 0.6rem; height: 100%; padding: 0.7rem; text-decoration: none; background: var(--paper); border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); font-weight: 700; line-height: 1.25; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.mini a:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.mini picture { aspect-ratio: 16 / 9; overflow: hidden; border: 3px solid var(--ink); display: block; }
.back { margin-top: 2rem; text-align: center; }

/* The bottom of the world. */
.bedrock { background: linear-gradient(rgb(0 0 0 / 0.35), rgb(0 0 0 / 0.55)), var(--stone) repeat left top / 64px 64px; image-rendering: pixelated; color: #eee; padding: 2.5rem 0 3rem; border-top: 6px solid #2e2e2e; }
.bedrock * { image-rendering: auto; }
.bedrock p { margin: 0 0 0.5rem; }
.footer-title { font: 1.4rem var(--title); color: var(--gold); letter-spacing: 0.02em; text-transform: uppercase; }
.chip svg { flex: none; image-rendering: pixelated; }
.footer-link { color: #fff; font-weight: 700; }
.small { font-size: 0.9rem; color: #bbb; }

@media (max-width: 520px) {
	.brand { font-size: 1rem; gap: 0.5rem; }
	.brand img { width: 34px; height: 34px; }
}

@media (max-width: 760px) {
	.story-link { grid-template-columns: 1fr; }
	.story-text { padding: 0 0.2rem 0.3rem; }
	.watch-title { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
	.clouds i, .youtube { animation: none; }
	.story-link, .mini a, .youtube, .story-cover img { transition: none; }
}
