/* ==========================================================================
   Ketebarbo — stylesheet
   Original 2001 look (Verdana 11px, #333 text, stone-blue logo, tiled
   background, dotted rules) rebuilt with modern CSS. No layout tables.
   ========================================================================== */

:root {
  --text: #333333;
  --text-muted: #555555;
  --text-faint: #777777;
  --link-hover: #6699cc;
  --link-active: #ff0000;
  --accent: #336699;
  --rule: #cccccc;
  --rule-dotted: #dddddd;
  --paper: #ffffff;
  --paper-tint: #faf9f6;
  --font: Verdana, Geneva, Arial, sans-serif;
  --font-mono: "Courier New", Courier, monospace;
  --size: 11px;
  --size-small: 10px;

  /* guestbook */
  --gb-gold: #ffd700;
  --gb-brown: #776633;

  /* NFO terminal */
  --nfo-green: #33ff33;
}

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

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

body {
  margin: 0;
  background: var(--paper) url("../images/kb_background.jpg");
  font-family: var(--font);
  font-size: var(--size);
  line-height: 1.5;
  color: var(--text);
}

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

p {
  margin: 0 0 1em;
}

a {
  color: var(--text);
  text-decoration: none;
}
a:visited {
  color: var(--text);
}
a:hover,
a:focus-visible {
  color: var(--link-hover);
  text-decoration: underline;
}
a:active {
  color: var(--link-active);
}

/* Links inside running text get a faint dotted underline so they can be found;
   menus and button-like links keep the clean 2001 look. */
.content-box p a,
.content-box li a,
.gb-intro a {
  text-decoration: underline dotted #999999;
  text-underline-offset: 2px;
}
.content-box p a:hover,
.content-box li a:hover {
  text-decoration: underline solid;
}
.extras li a {
  text-decoration: none;
}

:focus-visible {
  outline: 1px dotted var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -40px;
  padding: 4px 8px;
  background: var(--paper);
  border: 1px solid var(--rule);
  z-index: 10;
}
.skip-link:focus {
  top: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Splash page (/)
   -------------------------------------------------------------------------- */

.splash {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px 16px;
}

.splash-photo {
  position: relative;
  width: 400px;
  max-width: 100%;
  line-height: 0;
}

.splash-photo img {
  display: block;
  width: 100%;
  border: 1px solid var(--text);
}

/* The band-member hotspots scale with the photo (replaces the fixed-pixel image map) */
.splash-photo svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.splash-photo polygon {
  fill: transparent;
  pointer-events: all;
  cursor: pointer;
}
.splash-photo a:focus-visible polygon {
  fill: rgba(255, 255, 255, 0.15);
  stroke: #ffffff;
  stroke-dasharray: 3 3;
}

/* --------------------------------------------------------------------------
   Page frame
   -------------------------------------------------------------------------- */

.site-frame {
  max-width: 720px;
  margin: 30px auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.site-header {
  padding: 20px 15px 0;
  text-align: center;
}
.site-header img {
  display: inline-block;
  vertical-align: top;
}

.rule {
  height: 0;
  margin: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.site-body {
  display: grid;
  grid-template-columns: 110px 1fr;
  min-height: 380px;
}

.site-nav {
  padding: 15px 12px;
  border-right: 1px dashed #aaaaaa;
}
.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.9;
}
.site-nav a {
  display: block;
  padding: 2px 0;
}
.site-nav a[aria-current="page"] {
  font-weight: bold;
  color: #000000;
}

.site-content {
  padding: 15px 20px 25px;
  background: var(--paper-tint) url("../images/kb_background.jpg");
}

.content-box {
  padding: 15px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e0e0e0;
}

.content-box h1 {
  margin: 0 0 1em;
  font-size: var(--size);
  font-weight: bold;
}

.site-footer {
  padding: 0 10px 10px;
  text-align: center;
  font-size: var(--size-small);
  color: var(--text-faint);
}
.site-footer .rule {
  margin-bottom: 10px;
}

/* Floated photo next to text (welcome page) */
.photo-right {
  float: right;
  margin: 0 0 10px 15px;
  border: 1px solid var(--text);
}
.clearfix::after {
  content: "";
  display: block;
  clear: both;
}

/* Small boxed note */
.note {
  clear: both;
  margin-top: 15px;
  padding: 8px 10px;
  border: 1px dotted #aaaaaa;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-muted);
  font-size: var(--size-small);
}
.note p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Demo pages
   -------------------------------------------------------------------------- */

.demo {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 15px;
  align-items: start;
}

.demo-cover {
  display: block;
  width: 200px;
  border: 1px solid var(--text);
}

.tracklist {
  margin: 10px 0;
  padding: 0;
  list-style: none;
}
.tracklist li {
  display: grid;
  grid-template-columns: 25px 1fr auto auto auto;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  border-bottom: 1px dotted var(--rule-dotted);
}
.tracklist li:hover {
  background: rgba(255, 255, 255, 0.6);
}
.tracklist .time {
  color: var(--text-faint);
  font-size: var(--size-small);
  font-variant-numeric: tabular-nums;
}
.tracklist .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tracklist .actions img {
  display: block;
}
/* Popularity meter: five small blocks, filled from /stats/popularity.json (levels only, no numbers) */
.tracklist .pop {
  display: inline-flex;
  gap: 2px;
}
.tracklist .pop i {
  display: block;
  width: 4px;
  height: 9px;
  background: #dddddd;
}
.tracklist .pop i.on {
  background: var(--link-hover);
}

.tracklist .track-note {
  color: var(--text-faint);
  font-size: var(--size-small);
}
/* bonus tracks from other occasions: set apart from the numbered tracklist (one gap before the first) */
.tracklist li:not(.unnumbered) + li.unnumbered {
  margin-top: 8px;
  border-top: 1px dotted var(--rule-dotted);
}

.tracklist li.is-current {
  background: rgba(102, 153, 204, 0.12);
}
.tracklist li.is-current .title {
  font-weight: bold;
}
.tracklist li.is-current.is-playing .title::after {
  content: " \266A";
  color: var(--accent);
}

.icon-btn {
  display: inline-flex;
  padding: 2px;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* Player bar (one per demo, plays the tracklist in order) */
.player-bar {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  padding: 8px 10px;
  border-radius: 4px;
  background: var(--text);
  color: #ffffff;
}
.player-bar.is-active {
  display: flex;
  flex-wrap: wrap;
}
.player-bar .now {
  flex: 1 1 140px;
  min-width: 0;
  overflow: hidden;
  font-weight: bold;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.player-bar .skip {
  padding: 2px 6px;
  border: 1px solid #777777;
  border-radius: 2px;
  background: #444444;
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}
.player-bar .skip:hover {
  background: #555555;
}
.player-bar audio {
  flex: 1 1 220px;
  height: 30px;
  min-width: 0;
}

.extras {
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}
.extras li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}
.extras .icon {
  display: inline-flex;
  justify-content: center;
  width: 30px;
}

.credits {
  margin-top: 15px;
}

/* --------------------------------------------------------------------------
   NFO viewer (dialog on demo pages)
   -------------------------------------------------------------------------- */

.nfo-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: 90vh;
  padding: 0;
  border: 2px solid var(--nfo-green);
  background: #000000;
  color: var(--nfo-green);
  box-shadow: 0 0 25px rgba(51, 255, 51, 0.3);
}
.nfo-dialog::backdrop {
  background: rgba(0, 0, 0, 0.85);
}
.nfo-dialog[open] {
  display: flex;
  flex-direction: column;
}
.nfo-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--nfo-green);
  background: #113311;
  font-family: monospace;
  font-size: 12px;
}
.nfo-dialog button {
  padding: 2px 8px;
  border: 0;
  background: var(--nfo-green);
  color: #000000;
  font-family: monospace;
  font-weight: bold;
  cursor: pointer;
}
.nfo-dialog .nfo-body {
  overflow: auto;
  padding: 15px;
}

.nfo-text {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.15;
  white-space: pre;
  color: var(--nfo-green);
}

/* Stand-alone NFO pages (/nfo-1/, /nfo-2/) */
.nfo-page {
  margin: 0;
  padding: 20px 16px;
  background: #000000;
  color: var(--nfo-green);
  font-family: var(--font-mono);
}
.nfo-page main {
  max-width: 750px;
  margin: 0 auto;
}
.nfo-page header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--nfo-green);
}
.nfo-page a,
.nfo-page a:visited {
  color: #ffffff;
  text-decoration: underline;
}
.nfo-page .nfo-text {
  overflow-x: auto;
}

/* --------------------------------------------------------------------------
   History
   -------------------------------------------------------------------------- */

.timeline {
  margin: 15px 0 20px;
  padding: 0 0 0 20px;
  list-style: none;
  border-left: 2px solid var(--link-hover);
}
.timeline li {
  position: relative;
  margin-bottom: 16px;
  padding-left: 10px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 3px;
  width: 10px;
  height: 10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--accent);
}
.timeline .when {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--accent);
  color: #ffffff;
  font-size: var(--size-small);
  font-weight: bold;
}
.timeline p {
  margin: 0;
}
.timeline p + p {
  margin-top: 6px;
}

.archive {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 6px 0 18px;
}
.archive figure {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex: 1 1 220px;
  margin: 0;
}
.archive img {
  display: block;
  width: auto;
  height: 150px;
  border: 1px solid var(--text);
}
.archive figcaption {
  color: var(--text-muted);
  font-size: var(--size-small);
}

/* Videos (extras page): local thumbnail until clicked, then the YouTube player */
.section-title {
  margin-top: 20px;
}
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}
.videos figure {
  margin: 0;
}
.videos figcaption {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: var(--size-small);
}
.video,
.video-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--text);
  background: #000000;
}
.video img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(51, 51, 51, 0.85);
  color: #ffffff;
  font-size: 16px;
}
.video:hover .video-play,
.video:focus-visible .video-play {
  background: var(--accent);
}

.link-list {
  margin: 4px 0 0;
  padding-left: 18px;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 40px;
  margin-bottom: 15px;
  line-height: 1.6;
}
.contact address {
  font-style: normal;
}
.contact .name {
  text-decoration: underline;
}
.lineup {
  display: block;
  border: 1px solid var(--text);
}

/* --------------------------------------------------------------------------
   Guestbook (read-only archive)
   -------------------------------------------------------------------------- */

.guestbook {
  min-height: 100vh;
  padding: 1px 16px;
  background: #aa8f41 url("../images/replokal.jpg") center / cover fixed;
  color: #ffffff;
}

.guestbook-container {
  max-width: 580px;
  margin: 30px auto;
  padding: 20px;
  border: 1px solid var(--gb-brown);
  background: rgba(0, 0, 0, 0.75);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.guestbook-container a,
.guestbook-container a:visited {
  color: var(--gb-gold);
  text-decoration: underline;
}
.guestbook-container a:hover {
  color: #ffffff;
}

.gb-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gb-brown);
}
.gb-header h1 {
  margin: 0;
  font-size: 14px;
  color: var(--gb-gold);
}

.gb-intro {
  color: #dddddd;
}

.gb-entry {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--gb-gold);
  background: rgba(255, 255, 255, 0.08);
}
.gb-entry .meta {
  margin-bottom: 5px;
  color: #cccccc;
  font-size: var(--size-small);
}
.gb-entry .meta strong {
  color: #ffffff;
}
.gb-entry p {
  margin: 0;
  white-space: pre-line;
}

/* --------------------------------------------------------------------------
   Small screens: keep the look, but stack and enlarge the 11px text
   -------------------------------------------------------------------------- */

@media (max-width: 650px) {
  :root {
    --size: 13px;
    --size-small: 11px;
  }
  .site-frame {
    margin: 10px;
  }
  .site-body {
    grid-template-columns: 1fr;
  }
  .site-nav {
    border-right: 0;
    border-bottom: 1px dashed #aaaaaa;
  }
  .site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
  }
  .site-content {
    padding: 12px;
  }
  .content-box {
    padding: 12px;
  }
  .demo {
    grid-template-columns: 1fr;
  }
  .demo-cover {
    order: -1;
    margin: 0 auto;
  }
  .photo-right {
    float: none;
    display: block;
    margin: 0 auto 12px;
  }
  .guestbook-container {
    margin: 16px auto;
    padding: 14px;
  }
}

/* --------------------------------------------------------------------------
   Print: just the content
   -------------------------------------------------------------------------- */

@media print {
  body,
  .site-content,
  .guestbook {
    background: none;
    color: #000000;
  }
  .site-nav,
  .player-bar,
  .skip-link,
  .tracklist .actions {
    display: none;
  }
  .site-frame {
    margin: 0;
    border: 0;
    box-shadow: none;
  }
  .site-body {
    display: block;
  }
}

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