/* =========================================================
   the paint prof — one stylesheet for the whole site
   Clean layout, hand-drawn art. Colours come off the mascot.
   No frameworks, no build step.
   ========================================================= */

:root{
  /* --- the mascot's palette --- */
  --ink:    #000000;   /* outlines — pure black, like the drawings */
  --red:    #AF0F00;   /* beret + paint splat                     */
  --shirt:  #7A8088;   /* his jumper                              */
  --skin:   #FFC49A;
  --hair:   #FFE45C;

  --paper:  #fffdf7;   /* page background  */
  --muted:  #6b655e;   /* quieter text     */
  --line:   rgba(0,0,0,.16);   /* tile outlines — thin and soft */

  --font-hand: "Comic Neue", "Comic Sans MS", "Chalkboard SE", cursive;
  --font-marker: "Gloria Hallelujah", var(--font-hand);
}

*,
*::before,
*::after{ box-sizing: border-box; }

html{ -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  font-family: var(--font-hand);
  font-size: clamp(16px, 1rem + 0.2vw, 18px);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img{ max-width: 100%; height: auto; }

.wrap{
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(26px, 6vw, 56px) clamp(16px, 4vw, 28px) 60px;
}

/* ---------------------------------------------------------
   Logo
   --------------------------------------------------------- */
.masthead{
  text-align: center;
  margin-bottom: clamp(30px, 6vw, 52px);
}

.wordmark{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .12em;
  margin: 0;
  font-family: var(--font-marker);
  font-size: clamp(2rem, 8vw, 3.4rem);
  font-weight: 400;
  line-height: 1;
  color: var(--red);
}
.wordmark__head{
  width: 1.15em;
  height: 1.15em;
  margin-top: -.18em;      /* sits on the baseline like a letter */
  object-fit: contain;
}

.masthead__sub{
  margin: .5em 0 0;
  font-size: clamp(.85rem, 2.6vw, .95rem);
  color: var(--muted);
}

/* ---------------------------------------------------------
   Row labels
   --------------------------------------------------------- */
.row-label{
  margin: clamp(26px, 5vw, 38px) 0 12px;
  font-family: var(--font-marker);
  font-size: clamp(1rem, 3.4vw, 1.2rem);
  font-weight: 400;
  color: var(--muted);
}
.row-label:first-of-type{ margin-top: 0; }

/* ---------------------------------------------------------
   The tile grid
   --------------------------------------------------------- */
.tiles{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 18px);
}

/* Each tile is three side-by-side zones: words | doodle | mascot.
   Nothing is stacked on top of anything else, so nothing can collide. */
.tile{
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  aspect-ratio: 2.35 / 1;
  padding: 10px 0 10px 16px;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

/* only the ones that go somewhere react to the mouse */
a.tile:hover,
a.tile:focus-visible{
  transform: translateY(-4px);
  border-color: var(--ink);
  box-shadow: 0 10px 20px rgba(0,0,0,.13);
}
a.tile:focus-visible{ outline: 3px solid var(--red); outline-offset: 3px; }

/* zone 1 — the words */
.tile__text{
  flex: 1 1 44%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tile__title{
  font-family: var(--font-marker);
  font-size: clamp(1rem, 2.3vw, 1.3rem);
  line-height: 1.15;
}

/* small "soon" note under the title */
.tile__soon{
  font-size: .74rem;
  line-height: 1.2;
  color: var(--muted);
}

/* zone 2 — the doodle */
.tile__art{
  flex: 0 1 30%;
  width: auto;
  height: 78%;
  min-width: 0;
}
.tile__art .ink, .tile__art .red,
.tile__art .grey, .tile__art .yellow{
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile__art .ink{ stroke: var(--ink); }
.tile__art .red{ stroke: var(--red); }
.tile__art .grey{ stroke: var(--shirt); }
.tile__art .yellow{ stroke: var(--hair); stroke-width: 3.4; }
.tile__art .big{ stroke-width: 3.4; }

/* zone 3 — the mascot, standing on the bottom edge of the tile */
.tile__prof{
  flex: 0 0 auto;
  align-self: flex-end;
  width: auto;
  height: 100%;
  max-width: none;
  margin: 0 -2px -10px 0;   /* stands exactly on the bottom edge */
  pointer-events: none;
}
/* the half-body poses are wide, so they're sized shorter */
.tile--yt .tile__prof{ height: 74%; }

/* --- per-tile colouring --- */
.tile--gallery{ background: #fffaf0; }
.tile--gallery .tile__title{ color: var(--red); }

.tile--quiz{ background: #fffce8; }

.tile--mystery{ background: #f4f4f2; }
.tile--mystery .tile__title{
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  color: var(--shirt);
}

.tile--yt{
  background: var(--red);
  border-color: var(--red);
}
.tile--yt .tile__title{ color: #fff; }
.tile--yt .play-box{ fill: #fff; stroke: var(--ink); stroke-width: 2.6; stroke-linejoin: round; }
.tile--yt .play-tri{ fill: var(--red); stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; }

.tile--video .play-box{ fill: var(--red); stroke: var(--ink); stroke-width: 2.6; stroke-linejoin: round; }
.tile--video .play-tri{ fill: #fff; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; }

/* tiles with no mascot give the doodle the leftover room */
.tile--merch{ background: #fff6ee; }
.tile--merch .tile__art{ flex-basis: 46%; height: 88%; margin-right: 10px; }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.site-footer{
  margin-top: clamp(36px, 7vw, 56px);
  text-align: center;
  font-size: .82rem;
  color: var(--muted);
}
.site-footer p{ margin: 0; }
.site-footer a{ color: var(--muted); }
.site-footer a:hover{ color: var(--red); }

/* ---------------------------------------------------------
   Sub-pages (/gallery/, 404)
   --------------------------------------------------------- */
.page{
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.page__prof{
  width: min(210px, 55%);
  margin: 0 auto 4px;
}
.page__title{
  margin: 0 0 .25em;
  font-family: var(--font-marker);
  font-size: clamp(1.9rem, 7vw, 2.9rem);
  font-weight: 400;
  color: var(--red);
}
.page__lead{
  margin: 0 auto 28px;
  color: var(--muted);
}
.page__lead a{
  color: var(--red);
  text-decoration-thickness: 2px;
}
.back-link{
  display: inline-block;
  padding: .5em 1.2em;
  font-family: var(--font-marker);
  font-size: .95rem;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.back-link:hover,
.back-link:focus-visible{
  transform: translateY(-3px);
  border-color: var(--ink);
  box-shadow: 0 8px 16px rgba(0,0,0,.12);
}

/* ---------------------------------------------------------
   Tablets and phones
   --------------------------------------------------------- */
@media (max-width: 760px){
  .tiles{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px){
  .tiles{ grid-template-columns: 1fr; }
  .tile{ aspect-ratio: 2.9 / 1; }        /* wider and shorter, one per row */
  .tile__title{ font-size: 1.25rem; }
  .tile--mystery .tile__title{ font-size: 1.7rem; }
}

/* respect "reduce motion" settings */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; }
}
