/* Musician Sound Design – site stylesheet

   Structure follows the design notes in DESIGN.md: full-width black, white
   and blue bands, quiet chrome, light-weight headlines, pill-shaped controls,
   8px card corners, an 8px spacing scale, no shadows. The colours are the
   company's own blue and silver, and the fonts are the ones already on the
   visitor's device. */

:root {
  /* Colour */
  --blue: #0000cd;
  --blue-pressed: #0000a0;
  --link-dark: #9db4ff;
  --silver: #c0c0c0;
  --black: #000;
  --ink: #000;
  --body: #333;
  --mute: #6b6b6b;
  --paper: #fff;
  --surface-soft: #f3f3f3;
  --surface-card: #f5f7fa;
  --hairline: #e3e3e3;
  --hairline-dark: rgba(229, 229, 229, 0.2);

  /* Spacing (8px base) */
  --s-xxs: 0.25rem;
  --s-xs: 0.5rem;
  --s-sm: 0.75rem;
  --s-md: 1rem;
  --s-lg: 1.5rem;
  --s-xl: 2rem;
  --s-xxl: 3rem;
  --s-section: clamp(3rem, 8vw, 6rem);

  /* Shape */
  --r-sm: 4px;
  --r-md: 8px;
  --r-full: 9999px;

  --measure: 70rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --band: max(var(--gutter), calc((100% - var(--measure)) / 2));
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

/* Stop phone browsers from enlarging text on long pages only */
html { -webkit-text-size-adjust: 100%; -moz-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--body);
  font: 400 1rem/1.5 var(--font);
}

img, video, iframe, audio { max-width: 100%; }
img { height: auto; }

a { color: var(--blue); text-underline-offset: 0.15em; }
a:active { color: var(--blue-pressed); }
/* Focus ring: a white ring inside a black one, visible on light and dark backgrounds.
   Embedded videos: the frame keeps the ring while its player has the focus. */
:focus-visible, iframe.is-focused { outline: 3px solid #000; outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }

.skip {
  position: absolute;
  left: -999rem;
  padding: var(--s-xs) var(--s-md);
  background: var(--paper);
}
.skip:focus { left: var(--s-xs); top: var(--s-xs); z-index: 10; }

/* Header: black band */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-xs) var(--s-lg);
  padding: var(--s-md) var(--band) var(--s-sm);
  background: var(--black);
  color: var(--silver);
}
.brand { display: flex; align-items: center; gap: var(--s-md); min-width: 0; }
.brand-logo { flex: none; }
.brand-text { display: grid; gap: var(--s-xxs); min-width: 0; }
.brand-link { display: block; line-height: 0; }
/* the address is shown under the name but is not part of the home link */
.brand-address { font-size: 0.875rem; }
.lang-switch { margin: 0; font-size: 0.875rem; }
.lang-switch a { color: var(--paper); }

.nav-toggle {
  display: none;
  padding: var(--s-xs) var(--s-md);
  border: 1px solid var(--silver);
  border-radius: var(--r-full);
  background: none;
  color: var(--paper);
  font: 700 0.875rem/1.25 var(--font);
  letter-spacing: 0.02em;
  cursor: pointer;
}
.nav-toggle[aria-expanded="true"] { background: var(--paper); border-color: var(--paper); color: var(--ink); }

/* Navigation: main menu continues the black band, product menu is a soft band of pills */

.main-nav, .sub-nav { padding: 0 var(--band); }
.main-nav { background: var(--black); border-top: 1px solid var(--hairline-dark); }
.sub-nav { position: relative; background: var(--surface-soft); }

.main-nav ul, .sub-nav ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}
.main-nav ul { gap: var(--s-xs); padding: var(--s-xs) 0; margin-left: calc(-1 * var(--s-md)); }
.sub-nav ul { gap: var(--s-xxs); padding: var(--s-sm) 0; margin-left: calc(-1 * var(--s-sm)); }

.main-nav a, .sub-nav a {
  display: block;
  border-radius: var(--r-full);
  text-decoration: none;
}
.main-nav a {
  padding: var(--s-xs) var(--s-md);
  color: var(--paper);
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
}
.main-nav a:hover { background: rgba(255, 255, 255, 0.16); }
.main-nav a[aria-current] { background: var(--blue); color: var(--paper); }
.sub-nav a {
  padding: 0.375rem var(--s-sm);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}
.sub-nav a:hover { background: var(--paper); }
.sub-nav a[aria-current] { background: var(--blue); color: var(--paper); }

/* Content: white band */

main {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--s-xxl) var(--gutter) var(--s-section);
  overflow-wrap: break-word;
}
main::after { content: ""; display: block; clear: both; }

h1, h2, h3 { color: var(--ink); line-height: 1.25; }
h1 { margin: 0 0 var(--s-lg); font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 300; letter-spacing: 0.005em; }
h2 { margin: var(--s-xxl) 0 var(--s-md); font-size: clamp(1.5rem, 3.5vw, 1.75rem); font-weight: 300; }
h3 { margin: var(--s-xl) 0 var(--s-xs); font-size: 1.125rem; font-weight: 600; }
p, ul, ol { margin: 0 0 var(--s-md); }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: var(--s-xxs); }
strong { color: var(--ink); }
main :is(p, ul, ol, h1, h2, h3, address) { max-width: 75ch; }
main :is(p, ul, ol, h2, h3, table) { display: flow-root; }
hr { clear: both; margin: var(--s-xxl) 0; border: 0; border-top: 1px solid var(--hairline); }
.clear { clear: both; }

blockquote {
  max-width: 75ch;
  margin: 0 0 var(--s-lg);
  padding: var(--s-xs) 0 var(--s-xs) var(--s-lg);
  border-left: 4px solid var(--blue);
  font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

address { margin: 0 0 var(--s-md); font-style: normal; }
address span { display: block; }

.lead { font-size: 1.375rem; font-weight: 300; line-height: 1.25; color: var(--ink); }
.small { font-size: 0.875rem; color: var(--mute); }

/* Notice box, e.g. the closing notice on the start page */
.note {
  max-width: 75ch;
  margin: 0 0 var(--s-xl);
  padding: var(--s-md) var(--s-lg);
  background: var(--surface-card);
  border-left: 4px solid var(--blue);
  border-radius: var(--r-sm);
}
.note p:last-child { margin-bottom: 0; }

.float-left, .float-right { max-width: 50%; margin-bottom: var(--s-lg); }
.float-left { float: left; margin-right: var(--s-xl); }
.float-right { float: right; margin-left: var(--s-xl); }

/* A picture with its caption, placed below the text it belongs to */
figure { margin: var(--s-lg) 0 var(--s-xl); }
figure img { display: block; }
figcaption { margin-top: var(--s-xs); font-size: 0.875rem; color: var(--mute); }
/* A picture at a moderate size, and a row of pictures side by side that
   share one caption (pictures of similar proportions get the same height) */
.figure-fit, .figure-row { max-width: 34rem; }
.figure-row div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-md); }
.figure-row img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

table { margin: 0 0 var(--s-lg); border-collapse: collapse; }
caption { padding: var(--s-xs) 0; font-weight: 600; color: var(--ink); text-align: left; }
th, td { padding: var(--s-xs) var(--s-md); border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: top; }
th { color: var(--ink); font-weight: 600; }
thead th { border-bottom-color: var(--ink); }

/* Media */

.video { max-width: 35rem; aspect-ratio: 16 / 9; margin: var(--s-md) 0 var(--s-lg); clear: both; }
.video iframe { width: 100%; height: 100%; border: 0; border-radius: var(--r-md); }

/* Two-click video placeholder: nothing loads from YouTube until its button is pressed */
.video-consent {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  background: #1c1c1c;
  color: #fff;
}
.video-consent p { margin: 0; max-width: none; }
.video-title { font-weight: 700; }
.video-note { font-size: 0.875rem; color: #e6e6e6; }
.video-consent a { color: #fff; }
.video-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.25rem; }
.video-load {
  padding: 0.5rem 1rem;
  border: 1px solid #fff;
  background: #fff;
  color: #000;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.video-load::before { content: "▶ " / ""; }
.video-load:hover { background: #ddd; }

/* With a preview image (a copy on our own server, see build.py): the picture
   fills the box, a dark veil keeps the white text readable (contrast > 7:1). */
.video-consent.has-thumb { position: relative; background: #000; }
.video-consent .video-thumb {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.3; pointer-events: none; border-radius: inherit;
}
.video-consent.has-thumb > p { position: relative; text-shadow: 0 1px 3px #000; }
.video-consent { border-radius: var(--r-md); }
video { display: block; width: 35rem; aspect-ratio: 16 / 9; background: var(--black); max-width: min(100%, 35rem); margin: var(--s-md) 0 var(--s-lg); border-radius: var(--r-md); }

.tracks { max-width: 45rem; padding: 0; list-style: none; }
.tracks li, .track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-xxs) var(--s-md);
  margin: 0;
  padding: var(--s-xs) 0;
  border-bottom: 1px solid var(--hairline);
}
.track { max-width: 40rem; }
audio { height: 2.25rem; }

/* News and players: one <article> per entry */

article { clear: both; padding-top: var(--s-xl); margin-top: var(--s-xl); border-top: 1px solid var(--hairline); }
article h2 { margin-top: 0; font-size: 1.375rem; }
article h3 { margin-top: var(--s-md); }

.years { max-width: none; display: flex; flex-wrap: wrap; gap: var(--s-xs); padding: 0; list-style: none; }
.years li { margin: 0; }
.years a {
  display: block;
  padding: var(--s-xs) var(--s-md);
  border: 1px solid #767676;
  border-radius: var(--r-full);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.years a:hover { border-color: var(--ink); }
.years a[aria-current] { background: var(--blue); border-color: var(--blue); color: var(--paper); }

/* News: everything in one column, pictures on their own line below the text */
.section-news article :is(.float-left, .float-right) {
  float: none;
  display: block;
  max-width: 100%;
  margin: var(--s-md) 0 var(--s-lg);
}

/* Home: full-width blue band, then product cards */

.home { padding-top: 0; }
.hero {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: center;
  column-gap: var(--s-xl);
  margin: 0 calc(50% - 50vw) var(--s-xxl);
  padding: var(--s-xl) var(--gutter);
  background: var(--blue);
  color: var(--paper);
}
.hero img { grid-row: 1 / 3; width: 9rem; }
.hero h1 { align-self: end; margin: 0 0 var(--s-xs); color: inherit; font-size: clamp(1.75rem, 4vw, 2.5rem); }
.hero h1, .hero p { max-width: 32rem; }
.hero p { align-self: start; margin: 0; font-size: clamp(1rem, 2vw, 1.125rem); font-weight: 300; }

.cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s-lg);
  max-width: none;
  margin-bottom: var(--s-xxl);
  padding: 0;
  list-style: none;
}
.cards li { margin: 0; }
.cards a {
  display: block;
  height: 100%;
  padding: var(--s-lg);
  border-radius: var(--r-md);
  background: var(--surface-card);
  color: var(--body);
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: none;
}
.cards a:hover { background: var(--blue); color: var(--paper); }
.cards a:hover strong { color: inherit; }
.cards strong { display: block; margin-bottom: var(--s-xs); color: var(--ink); font-size: 1.125rem; font-weight: 600; line-height: 1.25; }

/* Language chooser (start page): the blue greeting page of the old site with the
   language buttons. The page colour matches the background of the logo image. */

.chooser {
  max-width: none;
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--s-lg);
  padding: var(--s-xl) var(--s-md);
  background: #0000ce;
  color: var(--paper);
  text-align: center;
}
.chooser-logo { display: block; width: min(25rem, 80vw); height: auto; }
.chooser p { margin: 0; font-weight: 300; font-size: 1.125rem; }
.chooser h1 { margin: 0 0 var(--s-xs); line-height: 0; }
.chooser ul { display: flex; gap: var(--s-md); margin: var(--s-xs) 0; padding: 0; list-style: none; }
.chooser li { margin: 0; }
.chooser :is(p, ul, h1) { max-width: none; }
.chooser a {
  display: block;
  min-width: 9rem;
  padding: var(--s-sm) 1.75rem;
  border: 2px solid var(--paper);
  border-radius: var(--r-full);
  background: var(--paper);
  color: #0000ce;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.chooser li + li a { background: none; color: var(--paper); }
.chooser a:hover, .chooser a:focus-visible { background: var(--black); border-color: var(--black); color: var(--paper); }
.chooser :focus-visible { outline-color: #000; box-shadow: 0 0 0 2px #fff; }
.chooser small { color: var(--silver); font-size: 0.875rem; }

/* Footer: blue band */

.site-footer {
  padding: var(--s-xxl) var(--band);
  background: var(--blue);
  color: var(--paper);
  font-size: 0.875rem;
}
.site-footer p { margin: 0 0 var(--s-xs); }
.site-footer a { color: var(--paper); }

/* Link rows with dots between the entries. The dot is drawn after each entry,
   so a wrapped line ends with a dot and never starts with one; the empty
   alternative text keeps screen readers from reading the dots. */
.dots { display: flex; flex-wrap: wrap; align-items: baseline; margin: 0 0 var(--s-xs); padding: 0; list-style: none; }
.dots li:not(:last-child)::after { content: "·"; content: "·" / ""; padding: 0 0.45em; }

/* Responsive layout
   Base styles above are the desktop layout.
   The queries below adapt it step by step for other screens. */

/* Tablets and small laptops */
@media (max-width: 60rem) {
  .sub-nav ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-right: 2.5rem; }
  .sub-nav a { white-space: nowrap; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .float-left, .float-right { max-width: 38%; }

  /* Fading right edge hints that the product menu scrolls sideways */
  .sub-nav::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3rem;
    background: linear-gradient(to right, rgba(243, 243, 243, 0), var(--surface-soft) 85%);
    pointer-events: none;
  }
}

/* Phones */
@media (max-width: 40rem) {
  /* Logo, language and Menu button in the first row, the lettering in
     its own full-width row below so it stays readable */
  .site-header { flex-wrap: wrap; gap: var(--s-xs) var(--s-sm); padding-top: var(--s-sm); }
  .brand, .brand-text { display: contents; }
  .brand-logo { order: 1; width: 44px; height: 44px; }
  .brand-address { display: none; }
  .lang-switch { order: 2; flex: none; margin-left: auto; }
  .js-nav .nav-toggle { order: 3; }
  .brand-link { order: 4; flex: 1 1 100%; }
  .brand-link img { width: 100%; max-width: 409px; }

  .site-footer { font-size: 0.9375rem; }

  /* With JavaScript the menus fold behind the Menu button */
  .js-nav .nav-toggle { display: block; flex: none; }
  .js-nav #site-nav { display: none; }
  .js-nav #site-nav.is-open { display: block; }
  .js-nav .main-nav ul, .js-nav .sub-nav ul { flex-direction: column; flex-wrap: nowrap; overflow: visible; padding-right: 0; }
  .js-nav .main-nav a, .js-nav .sub-nav a { padding: var(--s-sm) var(--s-md); font-size: 1rem; white-space: normal; }
  .js-nav .sub-nav::after { display: none; }

  .main-nav ul { gap: 0; }
  .main-nav a { padding: var(--s-xs) var(--s-sm); font-size: 0.9375rem; }
  .sub-nav a { padding: var(--s-xs) var(--s-sm); }

  main { padding-top: var(--s-xl); }
  .lead { font-size: 1.2rem; }

  /* Images stack above the text instead of floating beside it */
  .float-left, .float-right {
    float: none;
    display: block;
    max-width: 100%;
    margin: 0 auto var(--s-md);
  }

  /* Wide tables scroll sideways inside the page */
  table { display: block; max-width: 100%; overflow-x: auto; }

  /* Sound samples: title above a full-width player */
  .tracks li, .track { flex-direction: column; align-items: stretch; }
  audio { width: 100%; }
  .video, video { max-width: 100%; }

  .cards { grid-template-columns: 1fr; gap: var(--s-md); }
  .hero { grid-template-columns: 1fr; justify-items: center; padding: var(--s-lg) var(--gutter); text-align: center; }
  .hero img { grid-row: auto; width: 6.5rem; margin-bottom: var(--s-sm); }

  .chooser ul { gap: var(--s-sm); }
  .chooser a { min-width: 7.5rem; padding: var(--s-sm) var(--s-lg); }
}

/* Small phones: pictures of a row one above the other */
@media (max-width: 30rem) {
  .figure-row div { grid-template-columns: 1fr; }
}

/* Very small phones */
@media (max-width: 24rem) {
  .brand-address { display: none; }
  .main-nav a { padding: var(--s-xs); font-size: 0.875rem; }
  .years a { padding: var(--s-xxs) var(--s-sm); }
}

/* Phones held sideways: keep the header short */
@media (max-height: 30rem) and (orientation: landscape) {
  .site-header { padding-top: var(--s-xxs); padding-bottom: var(--s-xxs); }
  .brand-logo { width: 36px; height: 36px; }
  .brand-address { display: none; }
  .chooser { gap: var(--s-sm); padding: var(--s-md); }
  .chooser-logo { width: 9rem; }
}

/* Touch screens: comfortable tap targets, no hover-only feedback */
@media (hover: none) and (pointer: coarse) {
  .main-nav a, .sub-nav a, .years a { min-height: 2.75rem; display: flex; align-items: center; }
  /* Room between list entries, so a finger hits the right link */
  main li + li { margin-top: var(--s-xs); }
  .lang-switch a, .site-footer a { display: inline-block; padding: var(--s-xs) 0; }
  .cards a:hover { background: var(--surface-card); color: var(--body); }
  .cards a:hover strong { color: var(--ink); }
}

@media print {
  .main-nav, .sub-nav, .nav-toggle, .lang-switch, .skip, audio, video, .video { display: none; }
  main :is(p, ul, ol, h1, h2, h3) { max-width: none; }
  .site-header, .site-footer, .hero { background: none; color: var(--ink); }
}
