/* IBM Plex Mono OFL 1.1, see fonts/OFL.txt */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/IBMPlexMono-Bold.woff2") format("woff2");
}

/* wsch_site design tokens (from WordPress global styles, spec 7.8) */
:root {
  --base: #202124;
  --contrast: #e8eaed;
  --primary: #e3cbc0;
  --secondary: #c9a86a;
  --tertiary: #303134;
  --content-width: min(640px, 90vw);
  --wide: 90vw;
  --font-size-xx-large:
    clamp(3.2rem, 3.2rem + ((1vw - 0.2rem) * 3.066), 5.653rem);
  --font-size-medium:
    clamp(1.1rem, 1.1rem + ((1vw - 0.2rem) * 0.375), 1.4rem);
  --font-size-small:
    clamp(0.85rem, 0.85rem + ((1vw - 0.2rem) * 0.188), 1rem);
  --space-30: 0.67rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--base);
  color: var(--contrast);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: clamp(1.198rem, 1.198rem + ((1vw - 0.2rem) * 0.878), 1.9rem);
  line-height: 1.7;
  font-weight: 500;
}

a { color: var(--contrast); text-decoration: underline; }
a:hover { text-decoration: none; }
a:active { color: var(--secondary); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
a:focus-visible { text-decoration: underline dashed; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--base);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

h1 { font-size: xx-large; font-weight: 500; }
h2 { font-size: x-large; font-weight: 500; }

.site-header,
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 4rem;
}

.site-header {
  align-items: center;
  justify-content: space-between;
}

.site-footer {
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.site-logo img { height: 3rem; display: block; }

.footer-claim { font-size: small; margin: 0; }
.footer-logo { height: 71px; width: auto; display: block; }
.footer-logo-link { display: block; }

.site-footer hr {
  border: 0;
  border-top: 1px solid var(--secondary);
  width: 100%;
  margin: 0.5rem 0;
}

.site-title {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: var(--font-size-xx-large);
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.site-header .site-title a { color: inherit; text-decoration: none; }
.site-header .site-title a:hover { text-decoration: underline; }

.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: var(--font-size-small);
}
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a.active { color: var(--primary); }

.site-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.social-links { list-style: none; display: flex; gap: 1rem; padding: 0; }
.social-links svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }
.social-links a { display: inline-flex; }

/* homepage: logo bleeds to the full viewport width */
.logo-banner {
  display: block;
  width: 100vw;
  max-width: 100vw;
  height: auto;
  margin-inline: calc(50% - 50vw);
}

/* homepage intro: wide, small, centered quote */
.intro {
  width: var(--wide);
  max-width: var(--wide);
  margin-inline: calc(50% - (var(--wide) / 2));
  margin-bottom: 1em;
  text-align: center;
  font-size: var(--font-size-medium);
  line-height: 1.6;
}

.intro blockquote {
  margin: 0;
  padding: 0 var(--space-30);
  border: 0;
  border-left: 1px solid var(--contrast);
  font-style: italic;
}

.intro blockquote p {
  font-size: inherit;
  font-weight: bold;
}

.intro-rule {
  border: 0;
  border-top: 2px solid var(--tertiary);
  width: 100px;
  max-width: 100%;
  margin: 1rem auto;
}

/* post list + cards */
/* break out of the 640px .site-main: 3 columns up to ~90vw */
.post-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  width: var(--wide);
  max-width: var(--wide);
  margin-inline: calc(50% - (var(--wide) / 2));
}
.post-card { min-width: 0; }
.post-card img { max-width: 100%; height: auto; }
.post-meta { color: var(--secondary); font-size: small; }
.release-label { font-weight: bold; }
.post-author { margin-left: 0.75rem; }

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

.post-cover { margin: 0 0 1.5rem; }
.post-cover img { display: block; max-width: 100%; height: auto; }

/* WordPress block fallbacks */
.wp-block-image { margin: 0; }
.wp-block-image img { max-width: 100%; height: auto; vertical-align: bottom; }

/* Media + text: image 50% left, caption 50% right (WordPress defaults) */
.wp-block-media-text {
  display: grid;
  grid-template-columns: 50% 1fr;
  grid-template-rows: auto;
}
.wp-block-media-text > .wp-block-media-text__media {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  align-self: center;
}
.wp-block-media-text > .wp-block-media-text__content {
  grid-column: 2;
  grid-row: 1;
  padding: 0 8%;
  align-self: center;
  word-break: break-word;
}
.wp-block-media-text__media img {
  width: 100%;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.wp-block-columns { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.wp-block-columns > * { flex: 1 1 200px; }

pre, code {
  font-family: ui-monospace, monospace;
  background: var(--tertiary);
  border-radius: 2px;
}
pre { padding: 1rem; overflow-x: auto; }
code { padding: 0.1em 0.3em; }

.wp-block-file a,
.wp-block-file .wp-block-file__button {
  background: var(--primary);
  color: var(--base);
  text-transform: uppercase;
  font-size: small;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0;
  text-decoration: none;
}

/* player */
.featured-label { text-align: center; }

.wsch-site-player { margin: 1.5rem 0; }
.wsch-wave {
  height: 80px;
  background: var(--tertiary);
  cursor: pointer;
}
.wsch-canvas { width: 100%; height: 80px; display: block; }

.wsch-controls { display: flex; gap: 1rem; align-items: center; margin: 0.5rem 0; }
.wsch-controls button,
.wsch-volume button {
  background: var(--primary);
  color: var(--base);
  border: 0;
  border-radius: 0;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 600;
}

.wsch-volume { display: flex; gap: 0.5rem; align-items: center; }
.wsch-volume-slider { flex: 1; }

.wsch-tracks { list-style: none; padding: 0; margin: 1rem 0 0; }
.wsch-tracks li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  cursor: pointer;
}
.wsch-tracks li.active { color: var(--primary); }
.wsch-track-dl { text-decoration: none; }

@media (max-width: 600px) {
  .post-list {
    grid-template-columns: 1fr;
    width: auto;
    max-width: none;
    margin-inline: 0;
  }
}

@media (max-width: 600px) {
  .wp-block-media-text.is-stacked-on-mobile {
    grid-template-columns: 100% !important;
  }
  .wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__media {
    grid-column: 1;
    grid-row: 1;
  }
  .wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__content {
    grid-column: 1;
    grid-row: 2;
    padding: 0.5rem 0 0;
  }
}

@media (max-width: 700px) {
  .site-header, .site-footer { flex-direction: column; align-items: flex-start; }
  .site-footer { text-align: left; }
}
