/* bulletpies.com · direction B "Blue Sky"
   cobalt + orange on warm paper, chunky type, sticker energy */

:root {
  --paper:   #f7f3ea;
  --ink:     #17192b;
  --cobalt:  #1b2fd6;
  --cobalt-2:#2a43ff;
  --cobalt-3:#1525b8;
  --orange:  #f28c28;
  --card:    #ffffff;
  --muted:   #5b5f78;
  --edge:    #e3ddd0;
  --disp: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 16.5px; line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--cobalt); text-decoration: none; }
a:hover { color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--disp); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 .5em; text-wrap: pretty; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.topbar { padding: 16px 0; }
.topbar-in { display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--disp); font-weight: 800; font-size: 22px; color: var(--ink); letter-spacing: -0.02em; }
.brand img { width: 40px; height: auto; transform: rotate(-6deg); transition: transform .25s; }
.brand:hover img { transform: rotate(6deg); }
.topnav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.topnav a { padding: 9px 15px; border-radius: 999px; font-weight: 800; font-size: 15px; color: var(--ink); }
.topnav a:hover, .topnav a[aria-current="page"] { background: #fff; box-shadow: 0 1px 0 var(--edge); color: var(--cobalt); }
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 21px; border-radius: 14px; font-weight: 900; font-size: 15px; border: 0; cursor: pointer; transition: transform .12s; }
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { color: #fff; }
.btn-orange { background: var(--orange); color: var(--ink); }
.btn-orange:hover { color: var(--ink); filter: brightness(1.06); }
.btn-ghost { background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,.22); }

/* ---------- hero ---------- */
.hero { margin: 10px 0 0; border-radius: 36px; background: var(--cobalt); color: #fff; position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0,7fr) minmax(0,5fr); align-items: center; min-height: 540px; }
.hero-blob { position: absolute; border-radius: 50%; }
.hero-blob.a { right: -80px; top: -80px; width: 420px; height: 420px; background: var(--cobalt-2); animation: drift 26s ease-in-out infinite; }
.hero-blob.b { left: 46%; bottom: -120px; width: 360px; height: 360px; background: var(--cobalt-3); animation: drift 32s ease-in-out infinite reverse; }
@keyframes drift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-26px,18px); } }
.hero-copy { padding: 56px 10px 56px 52px; position: relative; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.hero-chip { padding: 8px 14px; border-radius: 999px; background: var(--orange); color: var(--ink); font-weight: 900; font-size: 13px; transform: rotate(-2deg); }
.hero h1 { font-size: clamp(38px, 5.2vw, 64px); margin: 0; }
.hero-sub { font-size: 19px; opacity: .93; max-width: 500px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stage { position: relative; height: 540px; }
.ghost { position: absolute; right: 42px; bottom: 40px; width: 480px; height: 480px; pointer-events: none; }
@keyframes bob-slow { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes bob-mid  { 0%,100% { transform: translateY(-10px); } 50% { transform: translateY(6px); } }
@keyframes bob-fast { 0%,100% { transform: translateY(4px); } 50% { transform: translateY(-9px); } }
@keyframes fade-pulse { 0%,100% { opacity: .92; } 50% { opacity: .66; } }
@keyframes breathe { 0%,100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-4px) scaleY(1.008); } }
.ghost.cow   { animation: bob-slow 5.6s ease-in-out infinite, fade-pulse 7.3s ease-in-out infinite; }
.ghost.sheep { animation: bob-mid 4.7s ease-in-out infinite .8s, fade-pulse 6.1s ease-in-out infinite .5s; }
.ghost.pig   { animation: bob-fast 5.1s ease-in-out infinite 1.6s, fade-pulse 8.2s ease-in-out infinite 1.1s; }
.hero-bullet { position: absolute; right: 225px; bottom: -18px; width: 165px; animation: breathe 5s ease-in-out infinite; transform-origin: bottom center; }
.sticker { position: absolute; padding: 10px 14px; border-radius: 14px; background: #fff; color: var(--ink); font-weight: 900; font-size: 14px; box-shadow: 0 8px 20px rgba(0,0,0,.18); display: flex; align-items: center; gap: 8px; }
.sticker.l { left: 30px; top: 60px; transform: rotate(-8deg); }
.sticker.r { right: 22px; top: 40px; transform: rotate(6deg); background: var(--paper); }

/* ---------- social chips ---------- */
.chips { display: flex; gap: 13px; align-items: center; padding: 20px 0 0; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 9px; padding: 11px 17px; border-radius: 999px; background: #fff; border: 2px solid var(--ink); font-weight: 900; font-size: 14px; color: var(--ink); transition: transform .15s; }
.chip:hover { transform: translateY(-2px) rotate(-1deg); color: var(--ink); }
.chips-note { margin-left: auto; font-weight: 700; font-size: 14px; color: var(--muted); }

/* ---------- sections ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 48px 0 8px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 0; }
.section-head a { font-weight: 900; font-size: 15px; }

/* ---------- mod cards ---------- */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; padding: 12px 0 8px; }
.mod-card { background: var(--card); border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 11px; box-shadow: 0 2px 0 var(--edge); transition: transform .18s, box-shadow .18s; position: relative; }
.mod-card:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 12px 26px rgba(23,25,43,.12); }
.mod-card .icon { width: 100%; aspect-ratio: 1; border-radius: 16px; object-fit: cover; image-rendering: pixelated; background: var(--paper); }
.mod-card h3 { font-size: 20px; margin: 0; }
.mod-card .pitch { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0; }
.mod-card .row { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.tag { padding: 6px 10px; border-radius: 8px; font-weight: 900; font-size: 12px; }
.tag-wiki { background: var(--cobalt); color: #fff; }
.tag-wiki:hover { background: var(--cobalt-2); color: #fff; }
.tag-get { background: var(--orange); color: var(--ink); }
.tag-get:hover { filter: brightness(1.06); color: var(--ink); }
.tag-soon { background: var(--paper); color: var(--muted); }
.tag-dl { background: var(--paper); color: var(--muted); font-weight: 800; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: 24px; }

/* ---------- feature band ---------- */
.band { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; padding: 26px 0 0; }
.panel { border-radius: 28px; padding: 30px; display: flex; flex-direction: column; gap: 12px; min-height: 210px; }
.panel .kicker { font-weight: 900; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.panel h2, .panel h3 { font-size: 27px; margin: 0; }
.panel-ink { background: var(--ink); color: var(--paper); }
.panel-ink .kicker { color: var(--orange); }
.panel-ink a { color: #fff; }
.panel-orange { background: var(--orange); color: var(--ink); }
.panel .cta { margin-top: auto; }

/* ---------- video cards ---------- */
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; padding: 12px 0; }
.vid-card { background: var(--card); border-radius: 20px; overflow: hidden; box-shadow: 0 2px 0 var(--edge); color: var(--ink); transition: transform .18s; display: flex; flex-direction: column; }
.vid-card:hover { transform: translateY(-4px); color: var(--ink); }
.vid-card .thumb { position: relative; aspect-ratio: 16/9; background: var(--ink); }
.vid-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.vid-card .play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(23,25,43,.82); display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.vid-card:hover .play { transform: scale(1.12); background: var(--cobalt); }
.vid-card .meta { padding: 14px 16px 16px; font-weight: 800; font-size: 15px; line-height: 1.35; }

/* ---------- about / prose ---------- */
.prose { max-width: 680px; font-size: 17.5px; }
.prose h2 { font-size: 30px; padding-top: 22px; }
.about-grid { display: grid; grid-template-columns: minmax(0,3fr) minmax(0,2fr); gap: 40px; align-items: start; padding: 30px 0; }
.about-figure { background: var(--cobalt); border-radius: 28px; padding: 28px 28px 0; display: flex; justify-content: center; overflow: hidden; }
.about-figure img { width: 78%; max-width: 320px; }

/* ---------- page hero (inner pages) ---------- */
.page-head { padding: 34px 0 6px; display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(34px, 4.5vw, 52px); margin: 0; }
.page-head .lede { color: var(--muted); font-size: 18px; max-width: 640px; font-weight: 600; }

/* ---------- filter bar ---------- */
.filter-bar { display: flex; gap: 10px; padding: 16px 0 4px; flex-wrap: wrap; align-items: center; }
.filter-bar input[type="search"] { flex: 1 1 240px; padding: 12px 18px; border-radius: 999px; border: 2px solid var(--ink); font: inherit; font-weight: 700; background: #fff; color: var(--ink); }
.filter-bar input::placeholder { color: var(--muted); }
.fbtn { padding: 9px 16px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; font: inherit; font-weight: 900; font-size: 13.5px; cursor: pointer; color: var(--ink); }
.fbtn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.count-note { font-weight: 700; color: var(--muted); font-size: 14px; padding: 6px 0 0; }

/* ---------- 404 ---------- */
.lost { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 60px 0 80px; gap: 8px; }
.lost img { width: min(360px, 70vw); animation: roll 4.5s ease-in-out infinite; }
@keyframes roll { 0%,100% { transform: translateX(-14px) rotate(-2deg); } 50% { transform: translateX(14px) rotate(2deg); } }
.lost h1 { font-size: clamp(38px, 6vw, 60px); }

/* ---------- footer ---------- */
footer { margin-top: 64px; padding: 26px 0 34px; border-top: 2px solid var(--edge); }
.foot-in { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; font-weight: 700; }
.foot-in .links { display: flex; gap: 16px; margin-left: auto; flex-wrap: wrap; }
.foot-in a { color: var(--muted); }
.foot-in a:hover { color: var(--cobalt); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 40px 28px 8px; }
  .hero-stage { height: 420px; }
  .ghost { width: 380px; height: 380px; right: calc(50% - 190px); bottom: 20px; }
  .hero-bullet { width: 132px; right: calc(50% - 40px); bottom: -14px; }
  .sticker.l { left: 12px; top: 10px; }
  .sticker.r { right: 8px; top: 62px; font-size: 12.5px; }
  .band, .about-grid { grid-template-columns: 1fr; }
  .chips-note { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 560px) {
  .topnav a { padding: 8px 11px; font-size: 14px; }
  .hero { border-radius: 24px; }
  .hero-stage { height: 340px; }
  .ghost { width: 300px; height: 300px; right: calc(50% - 150px); }
  .hero-bullet { width: 106px; right: calc(50% - 30px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ghost, .hero-bullet, .hero-blob, .lost img { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .001s !important; }
}

/* ---------- page buddy (pose next to inner-page headers) ---------- */
.page-head-buddy { justify-content: space-between; align-items: flex-end; }
.page-buddy { width: 130px; height: auto; margin-bottom: -26px; animation: buddy-bob 5s ease-in-out infinite; transform-origin: bottom center; }
@keyframes buddy-bob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(-2deg); } }
@media (max-width: 700px) { .page-buddy { width: 92px; } }
@media (prefers-reduced-motion: reduce) { .page-buddy { animation: none; } }
