/* Livid — sketchbook
   Everything visual is pulled from the logo: near-black ground, lavender marker scribbles,
   thick white outlines. Purple is her brand. No gradients, no glass. */
:root {
  --bg: #0d0912;          /* logo background */
  --surface: #171021;
  --ink: #f6f2fd;         /* the white outline */
  --text: #efe9f9;
  --muted: #c3b5dc;       /* brighter than before for contrast (7.9:1 on bg) */
  --accent: #c2a8f5;      /* lavender scribbles */
  --deep: #6d4cb0;        /* hoodie purple */
  --shadow: #4a2f80;

  --line-w: 3px;
  --hand: 18px 22px 16px 24px / 22px 16px 24px 18px;  /* slightly wonky "drawn" corners */
  --max: 1120px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --f-display: "Bagel Fat One", "Arial Black", system-ui, sans-serif;
  --f-hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;  /* only seen without JS */
  --f-body: var(--f-hand);  /* everything but the chunky headings is handwritten */

  --fs-hero: clamp(56px, 15vw, 132px);
  --fs-h2: clamp(34px, 6vw, 52px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px;
}
.skip:focus { top: 12px; }

h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1; }
h1, h2 {
  font-family: var(--f-display);
  color: var(--ink);
  text-shadow: .055em .055em 0 var(--deep);
  letter-spacing: .005em;
}

/* ---------- doodles ---------- */
.doodle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
  pointer-events: none;
}
.edge path { vector-effect: non-scaling-stroke; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  border-bottom: var(--line-w) solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.top.scrolled { background: var(--bg); border-color: var(--ink); }
.top-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--f-display); font-size: 20px; }
.brand img { border-radius: 50%; border: 2px solid var(--ink); display: block; transition: transform .4s var(--ease); }
.brand:hover img { transform: rotate(-10deg) scale(1.08); }
.brand span { display: none; }

.top nav { display: flex; gap: 2px; font-family: var(--f-hand); font-size: 16px; color: var(--muted); }
.top nav a { position: relative; padding: 10px 7px; transition: color .2s; }
.top nav a::after {
  /* hand-drawn underline */
  content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5 L10 2 L18 6 L26 2 L34 6 L42 2 L50 6 L58 3' fill='none' stroke='%23c2a8f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  clip-path: inset(0 100% 0 0);
  transition: clip-path .35s var(--ease);
}
.top nav a:hover, .top nav a.current { color: var(--ink); }
.top nav a:hover::after, .top nav a.current::after { clip-path: inset(0 0 0 0); }

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px;
  font: 700 17px/1 var(--f-body);
  color: var(--bg); background: var(--accent);
  border: var(--line-w) solid var(--ink);
  border-radius: var(--hand);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: 4px 4px 0 var(--deep); }
.btn--ghost:hover { box-shadow: 6px 6px 0 var(--deep); }
.btn--big { min-height: 56px; font-size: 19px; padding: 14px 28px; margin-top: 22px; }

.arrow-link {
  color: var(--accent); font-family: var(--f-hand); font-size: 17px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
}
.arrow-link::after { content: "\2192"; transition: transform .3s var(--ease); }
.arrow-link:hover::after { transform: translateX(5px); }

/* ---------- hero ---------- */
.hero { display: grid; gap: 28px; padding: 20px 0 48px; }
.hero-art { position: relative; width: min(78vw, 360px); margin: 12px auto 0; }
.hero-logo {
  position: relative; display: block; width: 100%; height: auto;
  border-radius: 50%;
  border: 6px solid var(--ink);
  box-shadow: 10px 10px 0 var(--deep);
  transform: rotate(-3deg);
}
.hero-art .doodle { position: absolute; height: auto; aspect-ratio: 1; }
.d1 { width: 34%; left: -13%; top: -6%;  }
.d2 { width: 20%; right: -10%; top: -4%; }
.d3 { width: 22%; right: -12%; top: 44%; }
.d4 { width: 24%; left: -13%; bottom: 4%; }
.d5 { width: 14%; right: -4%; bottom: -6%; }

.hero-text { text-align: center; }
.hero h1 { font-size: var(--fs-hero); position: relative; display: inline-block; text-shadow: .045em .045em 0 var(--deep); }
.under { position: absolute; left: 4%; right: 4%; bottom: -.2em; width: 92%; height: .2em; }
.lede { font-size: clamp(19px, 2.4vw, 23px); line-height: 1.5; color: var(--muted); max-width: 34ch; margin: 26px auto 26px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.trailer { margin-top: 28px; position: relative; }
.note {
  font-family: var(--f-hand); font-size: 20px; font-weight: 600; color: var(--accent);
  margin: 0 0 10px 6px; transform: rotate(-3deg); display: inline-block;
}

/* ---------- slots ----------
   Empty = a doodled "coming soon" page. Filled = the media, in a white outline. */
.slot {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 10;
  display: grid; place-items: center; align-content: center; gap: 4px;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--hand);
  box-shadow: 6px 6px 0 var(--deep);
  background-color: var(--surface);
  /* faint pencil hatching, like the logo's scribble fills */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M-4 14 L14 -4 M6 28 L28 6 M16 42 L42 16 M30 48 L48 30' stroke='%23c2a8f5' stroke-opacity='.10' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.slot:not(.filled)::before {
  content: ""; width: 64px; height: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M51 50 a3 3 0 1 0 -5 3 a8 8 0 1 0 13 -8 a14 14 0 1 0 -18 19 a21 21 0 1 0 27 -30' fill='none' stroke='%23c2a8f5' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.soon {
  font-family: var(--f-hand); font-size: 19px; font-weight: 600; color: var(--ink);
  transform: rotate(-4deg);
}
.slot.filled .soon { display: none; }
.soon.lettered .lettering { height: 1.6em; }
.slot-label {
  position: absolute; left: 12px; top: 10px;
  font-family: var(--f-hand); font-size: 14px; color: var(--muted);
  padding: 0 8px; border: 2px solid var(--muted); border-radius: 12px 8px 14px 9px;
}
.grid .slot:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: 9px 9px 0 var(--deep); }
.grid .slot:nth-child(even):hover { transform: translate(-3px, -3px) rotate(.6deg); }

.slot.filled { background: #000; }
.slot.filled .slot-label { display: none; }
.slot img, .slot video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.slot--wide { aspect-ratio: 16 / 9; box-shadow: 10px 10px 0 var(--deep); }
.slot--wide video { object-fit: contain; }
.slot--wide:not(.filled)::before { width: 96px; height: 96px; }
.slot--wide .soon { font-size: 26px; }
.slot--tall { aspect-ratio: 9 / 16; }

/* ---------- section edges ---------- */
.edge { display: block; width: 100%; height: 28px; stroke-width: 3; margin: 8px 0; }
.edge--flip { transform: scaleX(-1); }

/* ---------- sections ---------- */
.block { padding: 48px 0; }
.block h2 { font-size: var(--fs-h2); position: relative; display: inline-flex; align-items: center; gap: .2em; }
.h-doodle { width: .9em; height: .6em; stroke-width: 4; }
.block-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 28px; }

.grid { display: grid; gap: 18px; }
.grid--tall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid--tall .slot { box-shadow: 4px 4px 0 var(--deep); }
.grid--tall .slot:not(.filled)::before { width: 40px; height: 40px; }
.grid--tall .soon { font-size: 14px; }
.grid--tall .slot-label { font-size: 12px; left: 6px; top: 6px; padding: 0 5px; }
.grid--builds { grid-template-columns: 1fr; }

/* animations: a short, a longform, and a pointer back up to the trailer */
.grid--anim { grid-template-columns: 1fr; }
.anim-short { width: min(100%, 300px); justify-self: center; }
.anim-long video { object-fit: contain; }
.trailer-ref {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  color: var(--accent); text-decoration: none; font-size: 20px;
  border: 2px dashed var(--muted); border-radius: var(--hand);
  transition: transform .25s var(--ease), border-color .25s;
}
.trailer-ref .doodle { width: 44px; height: 44px; flex: none; stroke-width: 6; }
.trailer-ref:hover { transform: translate(-2px, -2px) rotate(-.6deg); border-color: var(--accent); }
.trailer-ref:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

/* build gallery: one big shot, thumbnails underneath swap it */
.showcase { margin: 0 0 44px; }
.show-main img { transition: opacity .25s var(--ease); }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.thumb {
  padding: 0; aspect-ratio: 16 / 9; overflow: hidden; cursor: pointer; background: #000;
  border: 2px solid var(--muted); border-radius: 10px 7px 12px 8px;
  transition: transform .2s var(--ease), border-color .2s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .7; transition: opacity .2s; }
.thumb:hover { transform: translate(-2px, -2px) rotate(-.8deg); }
.thumb:hover img, .thumb[aria-pressed="true"] img { opacity: 1; }
.thumb[aria-pressed="true"] { border: 3px solid var(--accent); box-shadow: 3px 3px 0 var(--deep); }
.thumb:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.showcase figcaption { margin-top: 14px; color: var(--accent); font-size: 18px; transform: rotate(-1.5deg); transform-origin: left; }

/* drawings — a sketchbook page */
.soon-card {
  position: relative;
  padding: 40px 24px;
  border: var(--line-w) dashed var(--muted);
  border-radius: var(--hand);
  text-align: center;
}
.soon-card p { margin: 14px 0 0; color: var(--muted); font-family: var(--f-hand); font-size: 19px; }
.soon-card .doodle { position: absolute; }
.soon-d1 { width: 80px; height: 66px; left: 12px; top: -26px; }
.soon-d2 { width: 34px; height: 34px; right: 18px; bottom: -14px; stroke-width: 4; }

/* commissions */
.comm-card {
  position: relative;
  padding: 28px 20px 30px;
  background: var(--surface);
  border: 4px solid var(--ink);
  border-radius: var(--hand);
  box-shadow: 10px 10px 0 var(--deep);
}
.comm-card > .doodle { position: absolute; }
.comm-d1 { width: 56px; height: 56px; right: -12px; top: -30px; }
.comm-d2 { width: 54px; height: 54px; left: -20px; bottom: -24px; }
.comm-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 24px; }
.status {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font: 700 16px/1 var(--f-body);
  padding: 8px 14px; border: 2px solid var(--accent); border-radius: 999px; color: var(--accent);
}
.dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--accent); animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3); opacity: 0; } }

.comm-body { display: grid; gap: 28px; }
.comm-body h3 { font-family: var(--f-hand); font-size: 22px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }

/* "Ask about a commission" opens a little note with the Discord handle */
.ask-msg {
  margin-top: 18px; padding: 16px 18px; position: relative;
  border: 2px dashed var(--accent); border-radius: var(--hand);
  transform: rotate(-.6deg);
}
.ask-msg p { margin: 0 0 6px; }
.ask-big { font-size: 20px; }
.ask-big strong { color: var(--accent); }
.copy {
  margin-top: 8px; padding: 4px 12px; cursor: pointer; font: inherit; color: var(--ink);
  background: transparent; border: 2px solid var(--muted); border-radius: 12px 8px 14px 9px;
}
.copy:hover { border-color: var(--accent); }
.copy:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.copy .copy-b, .copy.done .copy-a { display: none; }
.copy.done .copy-b { display: inline; }
.offer, .contact { list-style: none; margin: 0; padding: 0; }
.offer li { padding: 12px 0 12px 34px; position: relative; border-bottom: 2px dashed rgba(195, 181, 220, .3); }
.offer li::before {
  content: ""; position: absolute; left: 0; top: 16px; width: 22px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M2 11 L9 17 L22 2' fill='none' stroke='%23f6f2fd' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.offer strong { display: block; font-weight: 700; font-size: 19px; color: var(--ink); }
.offer span { color: var(--muted); }
.contact li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 0; border-bottom: 2px dashed rgba(195, 181, 220, .3); }
.contact .k { color: var(--muted); }
.contact .aside { flex-basis: 100%; text-align: right; color: var(--muted); font-size: 15px; }
.contact .v { font-weight: 700; font-size: 17px; color: var(--ink); word-break: break-word; }
.contact a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.placeholder { font-family: var(--f-hand); font-weight: 600 !important; font-size: 16px; color: var(--accent) !important; }

footer {
  max-width: var(--max); margin: 40px auto 0;
  padding: 24px var(--gutter) 40px;
  border-top: var(--line-w) solid var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  color: var(--muted); font-size: 15px;
}
footer .links { display: flex; gap: 6px; font-family: var(--f-hand); font-size: 16px; }
footer .links a { padding: 10px 8px; transition: color .2s; }
footer .links a:hover { color: var(--ink); }

/* ---------- hand-drawn lettering (lettering/*.png, see lettering/README.txt) ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.lettering { display: inline-block; height: 1.35em; width: auto; vertical-align: middle; }
.lettered.slot-label { padding: 2px 6px; }
.lettered.slot-label .lettering { height: 1.1em; }
.soon-card .lettering { height: auto; width: min(100%, 560px); }
.comm-body h3 .lettering { height: 1.25em; }

/* ---------- handwriting: every letter drawn as pen strokes by main.js, never the same twice ---------- */
.hw { word-spacing: .12em; }
.hw .w { display: inline-block; white-space: nowrap; word-spacing: normal; }
.hw svg {
  display: inline-block; height: 1em; vertical-align: -.22em; overflow: visible;
  fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- motion (only with JS, and never with reduced-motion) ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal="frame"] { transform: scale(.96) rotate(-1deg); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .grid .slot[data-reveal].in:hover { transition-delay: 0s; }

/* doodles draw themselves in: every path has pathLength="1" */
.js .doodle { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease); transition-delay: var(--dd, .1s); }
.js .doodle.in { stroke-dashoffset: 0; }
.d2 { --dd: .3s; } .d3 { --dd: .5s; } .d4 { --dd: .7s; } .d5 { --dd: .9s; }
.under { --dd: .6s; }

/* after drawing, the hero doodles "boil" like a hand-drawn loop */
.hero-art .doodle.in { animation: boil .6s steps(1) 1.8s infinite; }
.d3.in { animation-delay: 2s; } .d5.in { animation-delay: 2.2s; }
@keyframes boil {
  0%   { transform: rotate(0) translate(0, 0); }
  33%  { transform: rotate(-3deg) translate(1px, -1px); }
  66%  { transform: rotate(2deg) translate(-1px, 1px); }
}

.js .hero-logo { animation: pop .8s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: rotate(-12deg) scale(.85); } }

/* ---------- larger screens ---------- */
@media (min-width: 560px) {
  .brand span { display: inline; }
  .top nav { gap: 8px; font-size: 17px; }
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .top-inner { padding: 14px var(--gutter); }
  .grid--tall { gap: 18px; }
  .grid--tall .slot { box-shadow: 6px 6px 0 var(--deep); }
  .grid--tall .slot:not(.filled)::before { width: 56px; height: 56px; }
  .grid--tall .soon { font-size: 18px; }
  .grid--tall .slot-label { font-size: 13px; left: 10px; top: 8px; }
  .thumbs { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
  .grid--anim { grid-template-columns: 1fr 2.6fr; grid-template-rows: auto 1fr; align-items: start; gap: 24px; }
  .anim-short { width: 100%; grid-row: span 2; }
  .anim-long { grid-column: 2; }
  .trailer-ref { grid-column: 2; align-self: stretch; }
  .comm-card { padding: 40px 40px 44px; }
  .comm-body { grid-template-columns: 1fr 1fr; gap: 48px; }
  .block { padding: 64px 0; }
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 420px 1fr;
    align-items: center;
    column-gap: 72px;
    padding: 48px 0 72px;
  }
  .hero-art { width: 100%; margin: 0; }
  .hero-text { text-align: left; }
  .lede { margin-left: 0; }
  .hero-actions { justify-content: flex-start; }
  .trailer { grid-column: 1 / -1; margin-top: 40px; }
  .grid--tall { max-width: 860px; }
  .block { padding: 80px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .doodle { stroke-dashoffset: 0; }
}
