/* Carny Island — MIDNIGHT MARQUEE (Brett-picked 2026-07-20, concept A).
   Green logo glowing on black like a carnival sign at 2am. His font
   everywhere. The illustration stays clean — nothing overlays the art.
   Comic-book concepts remain parked in /designs pending Brett's design. */

@font-face{font-family:'CarnyIsland';src:url('../assets/carnyisland.ttf') format('truetype');font-display:swap}

:root {
  --bg: #050607;
  --ink: #f0ead9;
  --dim: #8f8a7e;
  --hair: #17191b;
  --green: #2fe524;
  --magenta: #e829c9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'CarnyIsland', system-ui, sans-serif;
  font-size: 17px; line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---- ambient stage light ---- */
.haze {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 45% at 50% 18%, rgba(47,229,36,.07), transparent 70%),
              radial-gradient(50% 40% at 80% 90%, rgba(232,41,201,.05), transparent 70%);
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe { 0%,100%{opacity:.75} 50%{opacity:1} }

/* ---- HERO: the sign, lit ---- */
.hero { position: relative; z-index: 1; min-height: 92svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.billing { max-width: 46ch; margin-bottom: 34px; color: var(--dim); font-size: clamp(.82rem, 2vw, .98rem); letter-spacing: .08em; line-height: 1.7; text-transform: uppercase; }
.billing b { font-weight: normal; color: var(--ink); }
.hero-logo {
  width: min(560px, 84vw);
  filter: drop-shadow(0 0 26px rgba(47,229,36,.42)) drop-shadow(0 0 90px rgba(47,229,36,.18));
  animation: flick 7s steps(1) infinite;
}
@keyframes flick { 0%,91%,93.5%,100%{opacity:1} 92%,93%{opacity:.82} }
.hero-tag { margin-top: 34px; font-size: clamp(1.25rem, 3.4vw, 2rem); letter-spacing: .02em; max-width: 24ch; line-height: 1.35; }
.hero-tag em { font-style: normal; color: var(--green); }
.hero .links { margin-top: 30px; }
.links a { margin: 0 16px; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.links a:hover { color: var(--green); }
.cue { margin-top: 56px; color: var(--dim); font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; }
.cue::after { content: ""; display: block; width: 1px; height: 44px; margin: 12px auto 0; background: linear-gradient(var(--green), transparent); }

/* ---- THE WORLD — art clean, lit like a stage ---- */
.world { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 30px 22px 0; text-align: center; }
.stage { position: relative; border: 1px solid #1b1e20; box-shadow: 0 0 60px rgba(47,229,36,.12), 0 30px 80px rgba(0,0,0,.7); }
.stage img, .world-poster { display: block; width: 100%; }
.world-state { margin-top: 20px; color: var(--green); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; }
.world-cap { max-width: 640px; margin: 12px auto 0; color: var(--dim); font-size: .95rem; }

/* ---- THE STORY — big lines, revealed on scroll ---- */
.story { position: relative; z-index: 1; max-width: 840px; margin: 0 auto; padding: 110px 24px 40px; }
.line { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; margin-bottom: 74px; }
.line.on { opacity: 1; transform: none; }
.line .k { display: block; color: var(--magenta); font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; margin-bottom: 14px; }
.line p { font-size: clamp(1.4rem, 3.6vw, 2.3rem); line-height: 1.3; }
.line p b { color: var(--green); font-weight: normal; }

/* ---- SUBSCRIBE ---- */
.sub { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 0 22px 40px; text-align: center; }
.subbox { border: 1px solid rgba(47,229,36,.4); box-shadow: 0 0 40px rgba(47,229,36,.12) inset, 0 0 30px rgba(47,229,36,.1); padding: 30px 26px; }
.subbox h2 { font-size: 1.5rem; margin-bottom: 6px; font-weight: normal; }
.subbox p { color: var(--dim); font-size: .9rem; margin-bottom: 16px; }
.substack-embed { width: 100%; height: 150px; border: 0; background: transparent; }
.subbox .note { margin-top: 12px; margin-bottom: 0; font-size: .8rem; }

/* ---- THE BUILD DIARY ---- */
.diary { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 70px 22px 80px; }
.diary-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--hair); padding-bottom: 14px; margin-bottom: 28px; }
.diary-head h2 { font-size: 1.4rem; font-weight: normal; letter-spacing: .04em; }
#search {
  flex: 1; min-width: 220px; max-width: 360px;
  background: transparent; border: 1px solid #22252a; color: var(--ink);
  padding: 9px 14px; font: inherit; font-size: .88rem;
}
#search:focus { outline: none; border-color: var(--green); box-shadow: 0 0 12px rgba(47,229,36,.15); }
#search::placeholder { color: var(--dim); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--hair); background: #0a0c0d; transition: border-color .15s, box-shadow .2s; }
.card:hover { border-color: rgba(47,229,36,.5); box-shadow: 0 0 30px rgba(47,229,36,.08); }
.card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-date { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--green); }
.card h3 { font-size: 1.12rem; line-height: 1.3; font-weight: normal; }
.card p { font-size: .88rem; color: var(--dim); flex: 1; }
.card-links { display: flex; gap: 16px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.card-links a { color: var(--green); }
.card-links a:hover { color: var(--ink); }
.card-tags { font-size: .74rem; color: var(--dim); }
.no-results { color: var(--dim); padding: 30px 0; text-align: center; grid-column: 1/-1; }

/* ---- Footer ---- */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--hair); padding: 44px 20px 50px; text-align: center; }
.footer-logo { width: 96px; height: auto; margin-bottom: 16px; }
.footer-links { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; font-size: .85rem; color: var(--dim); }
.footer-links a:hover { color: var(--green); }
.footer-line { color: var(--dim); font-size: .8rem; font-style: italic; }

/* ---- Post-page compatibility (topbar layout) ---- */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--hair); position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 12px; }
.topbar .logo { height: 48px; width: 48px; object-fit: contain; }
.wordmark { letter-spacing: .3em; font-size: .95rem; }
.cta { display: inline-block; padding: 12px 26px; border: 1px solid var(--green); color: var(--green); letter-spacing: .1em; font-size: .9rem; }
.cta:hover { background: var(--green); color: var(--bg); }

/* ---- Mobile ---- */
@media (max-width: 640px) {
  .hero { min-height: 86svh; padding: 40px 16px 24px; }
  .links a { margin: 0 8px; font-size: .76rem; }
  .world { padding: 20px 12px 0; }
  .story { padding: 70px 20px 20px; }
  .line { margin-bottom: 54px; }
  .diary-head { flex-direction: column; align-items: stretch; }
  #search { max-width: none; }
  .gallery { grid-template-columns: 1fr; gap: 24px; }
  .footer-links { flex-direction: column; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .haze, .hero-logo { animation: none; }
  .line { opacity: 1; transform: none; transition: none; }
}
