/* ==========================================================================
   BND Mixes
   Hand-written CSS, no framework, no build step. Mobile-first.
   Colours are sampled from the real logo art, not guessed. See Logo Rebuild.
   ========================================================================== */

:root {
  /* Brand. --red is the mean of the BND letterforms in the source logo. */
  --black: #000000;
  --panel: #0a0a0a;
  --line: rgba(255, 255, 255, 0.10);
  --red: #c60c10;
  --red-bright: #e8272c;
  --white: #fafafa;
  --silver: #aba7a7;
  --muted: #8a8a8a;

  /* Type. --font-display is a stand-in for the real site face, which has not
     been identified yet. Swap this one line when the real face is known. */
  --font-display: "Michroma", "Trebuchet MS", "Arial Black", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --header-h: 64px;
  --wrap: 1240px;
  --pad: 20px;
}

@media (min-width: 900px) {
  :root {
    --header-h: 96px;
    --pad: 40px;
  }
}

/* --------------------------------------------------------------- base ---- */

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

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

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--white); text-decoration: none; }
a:hover { color: var(--red-bright); }

:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--red);
  color: var(--white);
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------- header ---- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--black);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  height: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

/* Centre cell: the badge. */
.site-logo { justify-self: center; display: block; }
.site-logo img {
  width: 46px;
  height: 46px;
}
@media (min-width: 900px) {
  .site-logo img { width: 76px; height: 76px; }
}

/* Left cell: nav on desktop, menu button on mobile. */
.nav-toggle {
  justify-self: start;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  justify-self: start;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--black);
  border-bottom: 1px solid var(--line);
  transform: translateY(-120%);
  transition: transform 0.25s ease;
  visibility: hidden;
}
.site-nav[data-open="true"] {
  transform: translateY(0);
  visibility: visible;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 8px var(--pad) 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-nav a {
  display: block;
  padding: 12px 0;
  font-size: 17px;
}
.site-nav a[aria-current="page"] {
  color: var(--red-bright);
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    transform: none;
    visibility: visible;
    background: none;
    border: 0;
  }
  .site-nav ul {
    flex-direction: row;
    gap: 32px;
    padding: 0;
  }
  .site-nav a {
    padding: 4px 0;
    font-size: 16px;
    border-bottom: 1px solid transparent;
  }
  .site-nav a:hover { border-bottom-color: var(--red-bright); }
  .site-nav a[aria-current="page"] {
    color: var(--white);
    border-bottom-color: var(--white);
  }
}

/* Right cell: social. */
.header-social {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 16px;
}
.header-social svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
}

/* --------------------------------------------------------------- hero ---- */

main { padding-top: var(--header-h); }

.hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px var(--pad);
  background-color: #120303;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

@media (min-width: 900px) {
  .hero { min-height: 72vh; }
}

/* Phones get the 900px variant, larger screens get the full-size original.
   The originals are 1536px, which the build plan flags as already borderline
   small for full-bleed use. Higher-resolution source art is the only fix. */
.hero--home   { background-image: url("../img/hero-home-900.jpg"); }
.hero--mixes  { background-image: url("../img/hero-our-mixes-900.jpg"); }

@media (min-width: 900px) {
  .hero--home  { background-image: url("../img/hero-home.jpg"); }
  .hero--mixes { background-image: url("../img/hero-our-mixes.jpg"); }
}

/* Keeps the wordmark legible over the busiest part of the art. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.15) 60%, rgba(0, 0, 0, 0.35) 100%);
}

/* Drifting embers, drawn by assets/js/embers.js. Sits above the art and the
   darkening overlay, below the wordmark. Decorative only, so it is hidden
   from assistive tech and never takes a click. */
.hero__embers {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero__embers { display: none; }
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1000px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--white);
  line-height: 1.05;
  margin: 0;
  font-size: clamp(2.1rem, 9vw, 5.4rem);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.wordmark .is-red { color: var(--red-bright); }

.tagline {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: lowercase;
  line-height: 1.35;
  margin: 22px 0 0;
  font-size: clamp(0.95rem, 3.4vw, 1.9rem);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}
.tagline span { display: block; }
.tagline .is-red { color: var(--red-bright); }

/* ------------------------------------------------------------ sections --- */

.section {
  padding: 64px 0;
}
@media (min-width: 900px) {
  .section { padding: 88px 0; }
}

.section--tight { padding-top: 40px; }

.section__head {
  text-align: center;
  margin-bottom: 36px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

.page-title {
  font-size: clamp(2rem, 8vw, 4.4rem);
  text-transform: lowercase;
}

.section-title {
  font-size: clamp(1.3rem, 4.5vw, 2.1rem);
  text-transform: lowercase;
}

.lede {
  max-width: 62ch;
  margin: 16px auto 0;
  color: var(--silver);
  font-size: 1.02rem;
}

/* ------------------------------------------------------------- buttons --- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 14px 30px;
  border: 1px solid var(--white);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:hover {
  background: var(--white);
  color: var(--black);
}
.btn--red {
  border-color: var(--red);
  background: var(--red);
}
.btn--red:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
  color: var(--white);
}
.btn--block { display: block; width: 100%; text-align: center; }

/* ---------------------------------------------------------- mix grid ----- */

.mix-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 700px) {
  .mix-grid { grid-template-columns: repeat(3, 1fr); }
}

/* height: auto is load-bearing, do not remove it. The <img> carries
   width="800" height="800" as HTML attributes, which pin a used height of
   800px, and aspect-ratio only computes a dimension when the other one is
   auto. Without this line the covers render column-width by a fixed 800px
   and object-fit crops the art top and bottom. Fixed 2026-08-03. */
.mix__cover {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--panel);
}

/* Tiles line up on two counts, because mix titles are wildly different
   lengths. "give me a reason - nf" is one line, "takeover - yeat (prod.
   sanikwave & sky)" is two, and without both rules below the short tile's
   price and button float 24px above its neighbours.

   1. min-height on the title reserves two lines, so PRICES align.
   2. flex column + margin-top:auto on the buy row pins BUTTONS to the bottom,
      which still holds if a future title runs to three lines.

   Grid items stretch to equal height by default, so bottom-aligning inside
   each tile bottom-aligns them across the row. */

.mix {
  display: flex;
  flex-direction: column;
}

.mix__title {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  text-transform: lowercase;
  text-align: center;
  margin: 18px 0 0;
  line-height: 1.35;
  min-height: calc(2 * 1.35em);
}

.mix__price {
  text-align: center;
  color: var(--silver);
  font-size: 0.85rem;
  margin: 8px 0 0;
}

.mix__buy {
  margin-top: auto;
  padding-top: 16px;
}

/* ------------------------------------------------------ preview player --

   Progressive enhancement, and the order of it matters. The markup ships a
   plain <audio controls>, which plays on its own with no script at all. The
   custom button and bar are display:none until site.js sets data-enhanced on
   the wrapper, at which point they appear and the native player is hidden.

   So the tile is never dead: no JavaScript gets the browser's own controls,
   JavaScript gets the brand ones. Do not "tidy" this by making the custom
   controls visible by default, because that is what breaks the fallback. */

.preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.preview__btn,
.preview__bar,
.preview__time { display: none; }

.preview__audio { width: 100%; }

.preview[data-enhanced="true"] .preview__audio { display: none; }
.preview[data-enhanced="true"] .preview__btn  { display: flex; }
.preview[data-enhanced="true"] .preview__bar  { display: block; }
.preview[data-enhanced="true"] .preview__time { display: block; }

.preview__btn {
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--red);
  border-radius: 50%;
  background: transparent;
  color: var(--red-bright);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.preview__btn:hover {
  background: var(--red);
  color: var(--white);
}
.preview__btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* One SVG carries both icons and CSS picks which one shows. No second
   request, and no icon swapping for the script to get wrong. */
.preview__pause { display: none; }
.preview[data-playing="true"] .preview__play  { display: none; }
.preview[data-playing="true"] .preview__pause { display: inline; }
.preview[data-playing="true"] .preview__btn {
  background: var(--red);
  color: var(--white);
}

.preview__bar {
  flex: 1 1 auto;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.preview__fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red-bright);
}

.preview__time {
  flex: none;
  min-width: 4ch;
  text-align: right;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- split ----- */

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: stretch;
}
@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
  }
}

/* The media column matches the height of the form beside it rather than
   sitting short, which is what the original layout does. */
.split__media {
  min-height: 320px;
}
.split__media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

/* -------------------------------------------------------------- form ----- */

.form {
  max-width: 520px;
}

.field {
  margin-bottom: 30px;
}

.field > label,
.field > .field__label {
  display: block;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.field__req {
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.field__help {
  color: var(--silver);
  font-size: 0.86rem;
  margin: 0 0 10px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  color: var(--white);
  border: 0;
  border-bottom: 1px solid var(--silver);
  border-radius: 0;
  padding: 8px 0;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.18s ease;
}
.field textarea {
  min-height: 96px;
  resize: vertical;
}
.field select {
  appearance: none;
  padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, var(--silver) 50%),
                    linear-gradient(135deg, var(--silver) 50%, transparent 50%);
  background-position: right 12px center, right 6px center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.field select option { background: var(--black); color: var(--white); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: var(--red-bright);
  outline: none;
}

.field--check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.field--check input { width: 16px; height: 16px; accent-color: var(--red); }
.field--check label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  margin: 0;
}

.form__note {
  color: var(--silver);
  font-size: 0.88rem;
  margin-top: 22px;
  max-width: 46ch;
}

/* The custom mix terms. Sits above the form on purpose: price, turnaround
   and the edit policy are read before anyone fills anything in, not after. */
.terms {
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  padding: 22px 24px;
  margin: 28px 0 0;
  max-width: 52ch;
}
.terms__price {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: var(--white);
  margin: 0 0 14px;
}
.terms ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.terms li {
  color: var(--silver);
  font-size: 0.92rem;
  padding-left: 18px;
  position: relative;
  margin-bottom: 9px;
}
.terms li:last-child { margin-bottom: 0; }
.terms li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--red);
}

/* Shown by JS when a link or endpoint is still a placeholder. */
.stub-note {
  margin-top: 14px;
  padding: 10px 14px;
  border-left: 2px solid var(--red);
  background: var(--panel);
  color: var(--silver);
  font-size: 0.86rem;
}
.stub-note:empty { display: none; }

/* -------------------------------------------------------------- misc ----- */

.callout {
  border: 1px solid var(--line);
  padding: 34px var(--pad);
  text-align: center;
}

.empty-state {
  border: 1px dashed var(--line);
  padding: 56px 24px;
  text-align: center;
  color: var(--silver);
}

.pay-steps {
  list-style: none;
  counter-reset: step;
  margin: 24px 0 0;
  padding: 0;
  max-width: 60ch;
}
.pay-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 18px;
  color: var(--silver);
}
.pay-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--red);
  color: var(--white);
  font-size: 0.85rem;
}

/* ------------------------------------------------------------ footer ----- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer img { width: 54px; height: 54px; margin: 0 auto 18px; }
.site-footer nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 0 0 18px;
  padding: 0;
}
.site-footer a { color: var(--silver); }
.site-footer a:hover { color: var(--red-bright); }
.site-footer__social svg { width: 20px; height: 20px; fill: currentColor; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
