/* John and John – responsive opmaak (2026) */
:root {
  --dark: #698833;
  --green: #82a93f;
  --bar: #90bc32;
  --light: #c4da98;
  --paper: #fff;
  --ink: #333;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Century Gothic", "Futura", "Trebuchet MS", Arial, sans-serif;
  font-weight: bold;
  color: #fff;
  background: #fff url(../design_img/bodybg.gif) repeat 0 0;
}

.page {
  max-width: 970px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--green);
  box-shadow: 0 0 30px rgba(0, 0, 0, .15);
}

/* Kop met de twee Johns */
.header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  background: var(--dark);
  padding: 14px 4% 0;
  overflow: hidden;
}
.header::after {            /* het lichtgroene lint */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 10px;
  background: linear-gradient(var(--bar), #84ad2e);
  box-shadow: 0 -2px 4px rgba(0, 0, 0, .25);
}
.john {
  flex: 0 0 auto;
  width: clamp(80px, 16vw, 132px);
  aspect-ratio: 132 / 58;
  background: url(../design_img/header.gif) no-repeat;
  background-size: calc(970 / 132 * 100%) auto;
  margin-bottom: 4px;
}
.john--left  { background-position: calc(87 / (970 - 132) * 100%) calc(18 / (127 - 58) * 100%); }
.john--right { background-position: calc(745 / (970 - 132) * 100%) calc(14 / (127 - 58) * 100%); }

.title {
  flex: 1 1 auto;
  margin: 0 8px 18px;
  text-align: center;
  line-height: 1;
}
.title a {
  color: #fff;
  text-decoration: none;
  font-size: clamp(22px, 6vw, 46px);
  letter-spacing: .02em;
  white-space: nowrap;
}
.title small {
  display: block;
  margin-top: 4px;
  font-size: clamp(10px, 2.2vw, 13px);
  color: rgba(255, 255, 255, .55);
  letter-spacing: .05em;
}

main { padding: 20px 16px 40px; }

/* Strip */
.comic {
  position: relative;
  max-width: 714px;
  margin: 0 auto;
  padding: 14px;
  background: var(--paper);
  border-radius: 28px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.comic a { display: block; }
.comic img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 0 auto;
  transition: opacity .25s;
}
.comic img.loading { opacity: .2; }
.comic .nr {
  position: absolute;
  right: 18px; bottom: 6px;
  font-size: 11px;
  color: #bbb;
  font-weight: normal;
}

/* Mobiel: panelen onder elkaar */
.panels { display: none; }
.comic.is-stacked #comicimg { display: none; }
.comic.is-stacked .panels {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.comic.is-stacked .panels canvas {
  display: block;
  width: 100%;
  height: auto;
}
.comic.is-stacked .panels canvas + canvas {
  padding-top: 14px;
  border-top: 2px dashed #ddd;
}

/* Mobiel, panelen niet gevonden: strip groter en zijwaarts te vegen */
.swipe-hint { display: none; }
.comic.is-wide a {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.comic.is-wide #comicimg {
  width: 640px;
  max-width: none;
}
.comic.is-wide .swipe-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #aaa;
  text-align: center;
}

/* Knoppen */
.actions {
  display: flex;
  justify-content: center;
  margin: 18px 0 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 22px 6px 8px;
  border: 0;
  border-radius: 999px;
  background: var(--dark);
  color: #fff;
  font: inherit;
  font-size: 16px;
  letter-spacing: .04em;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .2);
  -webkit-tap-highlight-color: transparent;
}
.btn img { width: 44px; height: 44px; object-fit: cover; object-position: 50% 80%; border-radius: 50%; }
.btn:hover { background: #5b772b; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Schetsen */
.section-title {
  margin: 34px -16px 16px;
  padding: 12px 16px;
  text-align: center;
  font-size: 15px;
  letter-spacing: .08em;
  background: linear-gradient(var(--bar), #84ad2e);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}
.sketches {
  columns: 2;
  column-gap: 10px;
}
.sketches img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 10px;
  break-inside: avoid;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .2);
}
@media (min-width: 700px) {
  main { padding: 30px 30px 50px; }
  .section-title { margin-left: -30px; margin-right: -30px; }
  .sketches { columns: 4; column-gap: 14px; }
  .sketches img { margin-bottom: 14px; }
}

/* Eenvoudige tekstpagina (404) */
.message {
  max-width: 560px;
  margin: 30px auto;
  padding: 30px 20px;
  text-align: center;
  color: var(--ink);
  background: var(--paper);
  border-radius: 28px;
}
.message a { color: var(--dark); }
