/* ============================================================
   ZINK TOOLS - next: the site made of the effects it sells.
   Layered on top of ../assets/css/style.css (tokens, nav, buttons).
   ============================================================ */

:root {
  --ink-paper: #0e0e11;
  --ink-line: #050507;
}

body.next { overflow-x: hidden; }
body.next .grain { opacity: 0.35; }

/* ---- hero ---- */
.ink-hero {
  position: relative;
  height: 100vh; height: 100svh; height: var(--hero-h, 100svh); min-height: 520px;
  overflow: hidden;
  background: var(--ink-paper);
  isolation: isolate;
}
.ink-hero canvas#ink {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: pan-y; cursor: crosshair;
}
.ink-hero .halftone {
  position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.55) 0.7px, transparent 1.2px);
  background-size: 5px 5px;
  mask-image: linear-gradient(180deg, transparent 20%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 20%, #000 100%);
}
.ink-hero .hero-ui {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 0 clamp(28px, 6vh, 64px);
}
.ink-hero .hero-ui .wrap { pointer-events: none; }
.ink-hero .hero-ui a, .ink-hero .hero-ui button { pointer-events: auto; }
.ink-hero .kicker-row {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.ink-hero .kana {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.35em;
  color: var(--text-faint); border: 1px solid var(--panel-brd); padding: 4px 8px; border-radius: 4px;
  white-space: nowrap;
}
.ink-hero .kicker { color: var(--accent-hi); font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700; }
.ink-hero h1 {
  font-size: clamp(30px, 4.2vw, 58px); line-height: 1.02; letter-spacing: -0.02em;
  max-width: 14ch; margin: 0 0 14px;
  text-shadow: 0 2px 0 var(--ink-line), 0 0 24px rgba(0,0,0,0.6);
}
.ink-hero .lede { max-width: 52ch; color: var(--text-dim); font-size: clamp(15px, 1.2vw, 18px); text-shadow: 0 1px 0 var(--ink-line); }
.ink-hero .hero-cta { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.ink-hero .hint {
  position: absolute; right: 28px; bottom: 28px; z-index: 2; pointer-events: none;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); letter-spacing: 0.08em;
  display: flex; align-items: center; gap: 10px;
}
.ink-hero .hint i { display: inline-block; width: 34px; height: 1px; background: var(--text-faint); }

/* the hero copy holds on twos: it pops in as two drawings, not a tween */
@keyframes zt-pop-twos { 0% { opacity: 0; transform: translateY(14px) } 49% { opacity: 0; transform: translateY(14px) } 50% { opacity: 1; transform: translateY(4px) } 99% { transform: translateY(4px) } 100% { transform: none } }
.ink-hero .pop { animation: zt-pop-twos 0.34s steps(1, end) both; }
.ink-hero .pop.d1 { animation-delay: 0.08s; } .ink-hero .pop.d2 { animation-delay: 0.16s; } .ink-hero .pop.d3 { animation-delay: 0.24s; }
html.reduce-motion .ink-hero .pop { animation: none; }

/* ---- thesis band ---- */
.thesis { padding: clamp(56px, 9vh, 110px) 0 24px; }
.thesis h2 { font-size: clamp(26px, 3vw, 40px); letter-spacing: -0.02em; max-width: 24ch; line-height: 1.1; }
.thesis h2 em { font-style: normal; color: var(--accent-hi); }
.thesis p { color: var(--text-dim); max-width: 60ch; margin-top: 14px; }

/* ---- FX tiles: the plugin previews as panels, manga-style borders ---- */
.fx-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 24px 0 72px; }
@media (max-width: 900px) { .fx-tiles { grid-template-columns: 1fr; } }
.fx-tile {
  position: relative; overflow: hidden; border-radius: 6px;
  border: 2px solid var(--ink-line); box-shadow: 0 0 0 1px var(--panel-brd-hi), 8px 8px 0 0 var(--ink-line);
  background: var(--panel); aspect-ratio: 16 / 9; display: block; color: inherit; text-decoration: none;
  transition: transform 0.05s steps(2, end);
}
.fx-tile:hover { transform: translate(-3px, -3px); box-shadow: 0 0 0 1px var(--panel-brd-hi), 11px 11px 0 0 var(--ink-line); }
.fx-tile video, .fx-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fx-tile .tag {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  background: var(--ink-line); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: 0.04em;
  padding: 6px 10px; border-radius: 3px; border: 1px solid var(--panel-brd-hi);
}
.fx-tile .tag small { color: var(--accent-hi); margin-left: 8px; font-weight: 600; font-family: var(--font-mono); font-size: 11px; }

/* ---- new-this-week rail ---- */
.rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 12px; }
.rail-head h2 { font-size: 22px; letter-spacing: -0.01em; }
.rail-head .count { font-family: var(--font-mono); color: var(--text-faint); font-size: 13px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding: 16px 0 64px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail .card { scroll-snap-align: start; border: 1px solid var(--panel-brd); background: var(--panel); border-radius: 6px; overflow: hidden; text-decoration: none; color: inherit; display: block; }
.rail .card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #000; }
.rail .card .meta { padding: 10px 12px 12px; }
.rail .card .name { font-weight: 700; font-size: 14px; }
.rail .card .cat { font-family: var(--font-mono); color: var(--text-faint); font-size: 11px; margin-top: 3px; }
.rail .card .since { color: var(--accent-hi); font-size: 11px; font-family: var(--font-mono); margin-top: 6px; }

/* ---- projects grid (the studio, not the shop) ---- */
.projects { padding: 0 0 80px; }
.projects-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
@media (max-width: 1000px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
.proj { border: 1px solid var(--panel-brd); background: var(--panel); border-radius: 6px; padding: 16px; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; }
.proj::before { content: attr(data-num); position: absolute; top: 10px; right: 12px; font-family: var(--font-mono); color: var(--text-faint); font-size: 11px; }
.proj h3 { font-size: 16px; }
.proj p { color: var(--text-dim); font-size: 13px; margin-top: 6px; line-height: 1.45; }
.proj .badge { position: absolute; top: 10px; left: 12px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--accent-hi); border: 1px solid var(--accent-dim); padding: 2px 6px; border-radius: 3px; }

/* ---- ink-wipe section reveal ---- */
.zt-reveal { clip-path: inset(0 100% 0 0); }
.zt-reveal.zt-in { animation: zt-wipe 0.28s steps(4, end) forwards; }
@keyframes zt-wipe { from { clip-path: inset(0 100% 0 0) } to { clip-path: inset(0 0 0 0) } }
html.reduce-motion .zt-reveal { clip-path: none; animation: none; }

/* ---- touch devices: the canvas never takes the finger, the browser owns
   scrolling; taps are handled by the section (see index.html) ---- */
@media (pointer: coarse) {
  .ink-hero canvas#ink { pointer-events: none; touch-action: auto; }
  .ink-hero { cursor: default; }
}
/* ---- phones ---- */
@media (max-width: 640px) {
  .ink-hero .kana { display: none; }
  .ink-hero .kicker { font-size: 11px; letter-spacing: 0.16em; }
  .ink-hero .hero-ui { padding-bottom: 22px; }
}
@media (max-width: 640px) {
  .ink-hero .hint { display: none; }
  .ink-hero h1 { font-size: clamp(28px, 8.4vw, 40px); max-width: 100%; }
  .ink-hero .lede { font-size: 15px; }
  .ink-hero .hero-cta .btn { flex: 1 1 auto; text-align: center; }
  .thesis h2 { font-size: 26px; }
  .rail { grid-auto-columns: 78%; }
  .projects-grid { grid-template-columns: 1fr; }
  .fx-tiles { padding-bottom: 48px; }
}

/* ---- footer ---- */
.next-foot { border-top: 1px solid var(--panel-brd); padding: 28px 0 40px; color: var(--text-faint); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---- manga-panel treatment for the existing category cards on the home page ---- */
body.next .cat-card {
  border: 2px solid var(--ink-line) !important; border-radius: 6px;
  box-shadow: 0 0 0 1px var(--panel-brd-hi), 6px 6px 0 0 var(--ink-line);
  transition: transform 0.05s steps(2, end), box-shadow 0.05s steps(2, end);
}
body.next .cat-card:hover { transform: translate(-3px, -3px); box-shadow: 0 0 0 1px var(--panel-brd-hi), 9px 9px 0 0 var(--ink-line); }

/* ---- dev log ---- */
.devlog { padding: 0 0 72px; }
.devlog-list { display: grid; grid-template-columns: 150px 1fr; gap: 10px 22px; margin-top: 18px; }
@media (max-width: 700px) { .devlog-list { grid-template-columns: 1fr; } }
.devlog-date { font-family: var(--font-mono); color: var(--accent-hi); font-size: 13px; padding-top: 3px; }
.devlog-items { display: flex; flex-wrap: wrap; gap: 6px 8px; padding-bottom: 12px; border-bottom: 1px dashed var(--panel-brd); }
.devlog-items a { font-size: 13px; color: var(--text); text-decoration: none; border: 1px solid var(--panel-brd); background: var(--panel); padding: 4px 9px; border-radius: 4px; }
.devlog-items a:hover { border-color: var(--accent); color: var(--accent-hi); }
.devlog-items .more { font-family: var(--font-mono); color: var(--text-faint); font-size: 12px; padding: 4px 2px; }

/* ---- section head rhythm on the new page ---- */
body.next .block { padding-top: clamp(44px, 7vh, 88px); padding-bottom: clamp(44px, 7vh, 88px); }
.wrap.tight { padding-top: 0; }


/* ---- Trouble Duck suite: two hero tiles over three ---------------------
   Five cards in a three-column grid leaves a hole in the second row, which
   reads as a card that failed to load. A six-column track lets the first two
   run wide and the last three sit under them, which is a layout rather than a
   leftover. */
.td-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; padding: 4px 0 30px; }
.td-grid > * { grid-column: span 2; }
.td-grid > *:nth-child(1), .td-grid > *:nth-child(2) { grid-column: span 3; }
@media (max-width: 1000px) {
  .td-grid { grid-template-columns: repeat(2, 1fr); }
  .td-grid > *, .td-grid > *:nth-child(1), .td-grid > *:nth-child(2) { grid-column: span 1; }
}
@media (max-width: 620px) { .td-grid { grid-template-columns: 1fr; } }

.td-how { border-top: 1px solid var(--panel-brd); padding-top: 22px; margin-top: 8px; }
.td-how h3 { font-size: 18px; letter-spacing: -0.01em; margin-bottom: 14px; }
.td-steps { list-style: none; counter-reset: td; display: grid; gap: 12px; max-width: 74ch; }
.td-steps li { counter-increment: td; position: relative; padding-left: 34px; color: var(--text-dim); font-size: 14.5px; line-height: 1.5; }
.td-steps li::before {
  content: counter(td); position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 3px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--accent-ink); background: var(--accent);
}
.td-steps b { color: var(--text); font-weight: 700; }
.td-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; }
.td-note { color: var(--text-faint); font-size: 13px; }


/* ---- creators: the home band -------------------------------------------
   The suite used to own a full section here - five tiles, a numbered
   walkthrough and a CTA, 1300 px of home page for one product. It is a link
   now: one image, one line, one arrow. The material itself moved to
   /creators, which is built to hold about twenty of these. */
.creators-band-wrap { padding: 8px 0 64px; }
.creator-band {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 20px; align-items: center; text-decoration: none; color: inherit;
  border: 2px solid var(--ink-line); border-radius: 6px; overflow: hidden;
  background: var(--panel); box-shadow: 0 0 0 1px var(--panel-brd-hi), 8px 8px 0 0 var(--ink-line);
  transition: transform 0.05s steps(2, end);
}
.creator-band:hover { transform: translate(-3px, -3px); box-shadow: 0 0 0 1px var(--panel-brd-hi), 11px 11px 0 0 var(--ink-line); }
.creator-band-shot { width: 100%; height: 100%; min-height: 150px; object-fit: cover; display: block; background: #06040c; }
.creator-band-copy { display: block; padding: 18px 22px 18px 2px; }
.creator-band-copy b { display: block; font-size: clamp(1.1rem, 2vw, 1.5rem); margin: 8px 0 8px; letter-spacing: -0.01em; }
.creator-band-sub { display: block; color: var(--text-dim); font-size: 14px; line-height: 1.5; max-width: 62ch; }
.creator-band-cta { display: inline-block; margin-top: 12px; font-weight: 700; font-size: 13.5px; color: var(--accent-hi); }
.creator-band-cta i { font-style: normal; transition: transform 0.15s ease; display: inline-block; }
.creator-band:hover .creator-band-cta i { transform: translateX(4px); }
@media (max-width: 700px) {
  .creator-band { grid-template-columns: 1fr; }
  .creator-band-shot { aspect-ratio: 16 / 9; min-height: 0; }
  .creator-band-copy { padding: 0 18px 18px; }
}

/* ---- creators: the list ----
   Sized so one entry does not look lonely and twenty do not look cramped. */
.creator-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; padding-bottom: 40px; }
.creator-card {
  border: 1px solid var(--panel-brd); border-radius: 6px; overflow: hidden;
  background: var(--panel); text-decoration: none; color: inherit; display: block;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
a.creator-card:hover { transform: translateY(-3px); border-color: var(--panel-brd-hi); }
.creator-shot { display: block; }
.creator-shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #06040c; }
.creator-meta { display: block; padding: 12px 14px 14px; }
.creator-meta b { display: block; font-size: 15px; }
.creator-handle { display: block; font-family: var(--font-mono); font-size: 11.5px; color: var(--accent-hi); margin-top: 3px; }
.creator-tag { display: block; color: var(--text-dim); font-size: 13px; margin-top: 7px; line-height: 1.45; }
.creator-count { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: 9px; }
.creator-card.is-soon {
  border-style: dashed; background: transparent; display: grid; place-items: center;
  min-height: 190px; text-align: center;
}
.creator-soon { color: var(--text-faint); font-size: 13px; padding: 0 16px; }
