/* HomeGrown Comics, studio front end (hgc-studio.php) */
:root {
  --ink: #0f1110;
  --ink-2: #181b19;
  --ink-3: #232724;
  --paper: #f6f3ea;
  --paper-2: #ebe6d8;
  --text: #1a1c1b;
  --muted: #5d625e;
  --green: #22a447;
  --green-2: #178a39;
  --green-glow: rgba(34, 164, 71, .35);
  --yellow: #ffd23f;
  --red: #e63b2e;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .12);
  --wrap: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.hgc {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 17px/1.6 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-2); }
h1, h2, h3 { font-family: Poppins, Inter, sans-serif; line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }
.kicker {
  display: inline-block; font: 700 .78rem/1 Poppins, sans-serif; letter-spacing: .16em; text-transform: uppercase;
  color: var(--green-2); margin-bottom: .9rem;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.hl { color: var(--green); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.4em; border-radius: 999px; border: 2px solid transparent;
  font: 700 .98rem/1 Poppins, sans-serif; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 8px 22px var(--green-glow); }
.btn-primary:hover { background: var(--green-2); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-small { padding: .55em 1em; font-size: .85rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 50; background: rgba(15, 17, 16, .92);
  backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.head-row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.brand img { width: 132px; height: auto; }
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a {
  color: #e8ebe9; text-decoration: none; font: 600 .95rem/1 Poppins, sans-serif;
  padding: .7em .9em; border-radius: 999px; transition: background .15s, color .15s;
}
.site-nav a:hover { background: rgba(255, 255, 255, .08); }
.site-nav a[aria-current="page"] { color: #fff; background: var(--green); }
.nav-cart { display: inline-flex; margin-left: .3rem; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: #fff; border-radius: 2px; transition: .2s; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--ink); padding: 8px 16px 16px; gap: 2px; display: none;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .9em 1em; }
}

/* Hero */
.hero {
  background:
    radial-gradient(circle at 80% 30%, rgba(34, 164, 71, .28), transparent 45%),
    radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.4px) 0 0 / 14px 14px,
    var(--ink);
  color: #fff; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; padding: clamp(3rem, 8vw, 6.5rem) 0; }
.hero h1 { color: #fff; }
.hero .hl { font-family: Bangers, Poppins, sans-serif; font-weight: 400; letter-spacing: .02em; color: var(--yellow); display: inline-block; transform: rotate(-2deg); }
.hero .lead { color: #c5cbc7; }
.hero .kicker { color: #6fdc8c; }
.hero .btn-ghost { color: #fff; }
.hero-stack { position: relative; height: clamp(340px, 42vw, 520px); }
.hero-stack img {
  position: absolute; width: 58%; border-radius: 10px; border: 6px solid #fff;
  box-shadow: 0 25px 50px rgba(0, 0, 0, .5); object-fit: cover; aspect-ratio: 2 / 3;
  transition: transform .4s ease;
}
.stack-1 { left: 22%; top: 2%; transform: rotate(3deg); z-index: 3; }
.stack-2 { left: 0; top: 14%; transform: rotate(-8deg); z-index: 2; }
.stack-3 { right: 0; top: 18%; transform: rotate(9deg); z-index: 1; }
.hero-stack:hover .stack-2 { transform: rotate(-12deg) translateX(-12px); }
.hero-stack:hover .stack-3 { transform: rotate(13deg) translateX(12px); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-stack { height: 360px; max-width: 420px; margin-inline: auto; width: 100%; }
}

/* Sections */
.band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.band-ink { background: var(--ink); color: #e8ebe9; }
.band-ink .kicker { color: #6fdc8c; }
.band-ink .sec-lead { color: #a9b0ab; }
.band-ink .more { color: #6fdc8c; }
.band-paper { background: var(--paper-2); }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .4rem 1rem; margin-bottom: .6rem; }
.sec-head h2 { margin: 0; }
.sec-lead { color: var(--muted); max-width: 64ch; margin: 0 0 2rem; }
.more { font: 700 .95rem Poppins, sans-serif; text-decoration: none; white-space: nowrap; }
.page-head { background: var(--ink); color: #fff; padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3rem); }
.page-head .kicker { color: #6fdc8c; }
.page-head .lead { color: #c5cbc7; }
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Issue cards */
.issue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1.6rem; }
.issue-card {
  display: grid; grid-template-columns: 42% 1fr; gap: 1.3rem; padding: 1.2rem; background: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.issue-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, .16); }
.issue-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.issue-meta { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.issue-meta .kicker { margin: 0; }
.issue-title { font: 800 1.35rem/1.15 Poppins, sans-serif; }
.issue-blurb { color: var(--muted); font-size: .95rem; flex: 1; }
@media (max-width: 420px) { .issue-card { grid-template-columns: 1fr; } }

/* Timelapse cards */
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 42vw), 1fr)); gap: 1.2rem; }
.tl-card { all: unset; cursor: pointer; display: block; }
.tl-card:focus-visible .tl-media { outline: 3px solid var(--green); outline-offset: 3px; }
.tl-media { position: relative; display: block; border-radius: 12px; overflow: hidden; background: var(--ink-3); aspect-ratio: 4 / 5; }
.tl-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tl-card:hover .tl-media img { transform: scale(1.05); }
.tl-play {
  position: absolute; inset: auto auto 12px 12px; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: transform .2s ease;
}
.tl-card:hover .tl-play { transform: scale(1.1); }
.tl-dur { position: absolute; right: 10px; top: 10px; background: rgba(0, 0, 0, .7); color: #fff; font: 600 .75rem Inter; padding: .25em .55em; border-radius: 6px; }
.tl-title { display: block; margin-top: .6rem; font: 700 1rem Poppins, sans-serif; }
.band:not(.band-ink) .tl-title { color: var(--text); }

/* Gallery */
.masonry { columns: 4 260px; column-gap: 1.2rem; }
.art-tile { break-inside: avoid; margin: 0 0 1.2rem; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.art-tile a { display: block; overflow: hidden; }
.art-tile img { width: 100%; transition: transform .35s ease; }
.art-tile a:hover img { transform: scale(1.03); }
.art-tile figcaption { padding: .75rem .9rem .9rem; font-size: .9rem; color: var(--muted); }
.art-tile figcaption strong { display: block; color: var(--text); font: 700 1rem Poppins, sans-serif; }
.art-tile[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.chip {
  border: 2px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; border-radius: 999px;
  padding: .55em 1.1em; font: 600 .9rem Poppins, sans-serif; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); }
.strip { display: block; background: #fff; border-radius: 12px; padding: 10px; box-shadow: var(--shadow); }
.strips { margin-top: 3rem; }
.strips[hidden] { display: none; }
.strip-fig { margin: 0 0 2rem; }
.strip-fig figcaption { margin-top: .6rem; font: 700 1rem Poppins, sans-serif; }
.shop-card { background: var(--ink); color: #fff; padding: 2.2rem; border-radius: var(--radius); text-align: center; }
.shop-card p { color: #c5cbc7; }
.about .prose ul { padding-left: 1.2rem; }
.about-art img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Reader */
body.hgc.is-reader { background: var(--ink); color: #e8ebe9; }
.reader-bar { display: flex; justify-content: space-between; align-items: end; gap: 1rem; padding: 1.6rem 0 1rem; }
.reader-bar h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: .2rem 0 0; color: #fff; }
.reader-bar h1 span { color: #6fdc8c; }
.crumb { color: #a9b0ab; text-decoration: none; font-weight: 600; }
.reader-tools { display: flex; align-items: center; gap: 1rem; }
.page-count { font: 700 1rem Poppins, sans-serif; color: #a9b0ab; }
.reader .btn-small { background: var(--ink-3); color: #fff; }
.reader, .page { scroll-margin-top: 76px; }
.reader-stage { position: relative; display: flex; justify-content: center; align-items: center; padding: 0 16px; }
.pages { width: min(820px, 100%); }
.page { margin: 0; }
.page img { width: 100%; border-radius: 6px; box-shadow: 0 20px 50px rgba(0, 0, 0, .55); background: #222; }
.reader.paged .page { display: none; }
.reader.paged .page.on { display: block; }
.reader.scroll .page { margin-bottom: 1.5rem; }
.reader.scroll .pg-prev, .reader.scroll .pg-next, .reader.scroll .page-count { display: none; }
.pg-prev, .pg-next {
  position: sticky; top: 45vh; align-self: flex-start; margin-top: 30vh;
  width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--ink-3); color: #fff;
  font-size: 2rem; line-height: 1; cursor: pointer; flex: none; transition: background .15s;
}
.pg-prev:hover, .pg-next:hover { background: var(--green); }
.pg-prev { margin-right: 1.2rem; }
.pg-next { margin-left: 1.2rem; }
.page img { cursor: pointer; }
@media (max-width: 700px) {
  .pg-prev, .pg-next { position: fixed; top: auto; bottom: 18px; margin: 0; z-index: 20; box-shadow: 0 6px 18px rgba(0,0,0,.5); }
  .pg-prev { left: 16px; }
  .pg-next { right: 16px; }
}
.thumbs { display: flex; gap: .6rem; overflow-x: auto; padding: 1.5rem 0 .5rem; scrollbar-width: thin; }
.thumbs button { flex: none; width: 64px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; opacity: .55; transition: opacity .15s; }
.thumbs button:hover, .thumbs button.on { opacity: 1; border-color: var(--green); }
.thumbs img { border-radius: 4px; }
.reader.scroll .thumbs { display: none; }
.reader-next { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 2rem 0 4rem; }
.reader-next .btn-ghost { color: #fff; }
.soon { color: #a9b0ab; }
.soon a { color: #6fdc8c; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(8, 9, 8, .94);
  display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
}
.lightbox[hidden] { display: none; }
.lb-stage { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; padding: 56px 0 24px; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: calc(100vh - 120px); border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lb-stage figcaption { color: #fff; font: 700 1.05rem Poppins, sans-serif; margin-top: .8rem; text-align: center; }
.lightbox button { background: none; border: 0; color: #fff; font-size: 3rem; cursor: pointer; opacity: .8; }
.lightbox button:hover { opacity: 1; }
.lb-close { position: absolute; top: 8px; right: 16px; font-size: 2.6rem !important; }
.lightbox.single .lb-prev, .lightbox.single .lb-next { visibility: hidden; }
@media (max-width: 700px) { .lightbox { grid-template-columns: 36px 1fr 36px; } .lightbox button { font-size: 2.2rem; } }

/* Footer */
.site-foot { background: var(--ink); color: #a9b0ab; padding: 3.5rem 0 1.5rem; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.foot-logo { width: 140px; margin-bottom: 1rem; }
.site-foot h3 { color: #fff; font-size: 1rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: .35rem 0; }
.site-foot a { color: #c5cbc7; text-decoration: none; }
.site-foot a:hover { color: #6fdc8c; }
.foot-base { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 2.5rem; padding-top: 1.2rem; font-size: .85rem; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
