/* Groove Dog home page. Everything is scoped under .bn-home so it cannot leak
   into the Groove Scribe pages. Brand tokens and fonts are in brand.css, which
   every Groove Dog page links first.
   Linked from /index.html as home.css?v=dev; scripts/inject-html-bundles.mjs swaps
   in a content hash at deploy, since s/css is served without hashed filenames. */
.bn-home {
  /* Dark in both themes, like the hero: sections alternate between --surface and the stage. */
  --surface: #121920; --text: #e6e3db; --muted: #a4aeb5;
  background: var(--surface); color: var(--text);
  font: 400 1.0625rem/1.55 var(--bn-body);
}
.bn-home *, .bn-home *::before, .bn-home *::after { box-sizing: border-box; }
.bn-home a { color: inherit; }
.bn-home :focus-visible { outline: 3px solid var(--bn-brass); outline-offset: 3px; border-radius: 2px; }
/* The side gutter clears a notch in landscape (index.html sets viewport-fit=cover). */
.bn-wrap { --bn-gutter: clamp(1.1rem, 4vw, 2.5rem); max-width: 1180px; margin: 0 auto;
  padding: 0 max(var(--bn-gutter), env(safe-area-inset-right)) 0 max(var(--bn-gutter), env(safe-area-inset-left)); }
/* No header bar: only the account control (Account/vue/account_menu.js), in the screen's top
   right corner over the hero photo. It scrolls away with the hero. */
.bn-home-account { position: absolute; top: env(safe-area-inset-top, 0px); right: 0; z-index: 30; display: flex; align-items: center;
  height: var(--bn-header-h); padding-right: max(clamp(1.1rem, 4vw, 2.5rem), env(safe-area-inset-right, 0px)); color: var(--bn-header-text); }
.bn-home-account .bn-account-slot { display: flex; justify-content: flex-end; min-width: 88px; margin-left: 0; }
.bn-home-account .bn-account-slot-in { min-width: 44px; }
html { scroll-behavior: smooth; }

/* hero: fills the first screen at every size, so nothing below shows until you scroll. The photo
   (images/home-hero.*) has a dark pool behind the centred text and fades into the next section. */
.bn-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center;
  min-height: 100vh; min-height: 100svh; background: var(--bn-stage); color: #e6e3db; }
.bn-hero::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: url(/images/home-hero.jpg) center 40% / cover no-repeat;
  background-image: image-set(url(/images/home-hero.webp) type("image/webp"), url(/images/home-hero.jpg) type("image/jpeg")); }
.bn-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse 46% 62% at 50% 46%, rgba(11,15,20,.78) 0%, rgba(11,15,20,.5) 55%, rgba(11,15,20,0) 100%),
  linear-gradient(180deg, rgba(11,15,20,.25) 0%, rgba(11,15,20,.1) 60%, var(--surface) 100%); }
.bn-hero .bn-wrap { width: 100%; padding-top: clamp(1.2rem, 3.2vh, 2.5rem); padding-bottom: 5.5rem; text-align: center; }
/* The logo as drawn: the mark, then the name (the page's h1, an image with "Groove Dog" as its text). */
.bn-lockup { display: flex; flex-direction: column; align-items: center; }
.bn-lockup-mark { display: block; width: clamp(96px, 15.5vh, 150px); height: auto; }
.bn-hero h1 { margin: .5rem 0 0; line-height: 1; }
.bn-hero h1 img { display: block; width: clamp(250px, 29vw, 370px); height: auto; }
.bn-strap { display: flex; align-items: center; justify-content: center; gap: 1.1rem; margin: .95rem 0 0;
  font: italic 600 clamp(.95rem, 1.5vw, 1.15rem)/1 var(--bn-body); letter-spacing: .34em; text-transform: uppercase; color: #fff; }
.bn-strap::before, .bn-strap::after { content: ""; flex: none; width: clamp(28px, 5vw, 62px); height: 3px; border-radius: 2px; background: var(--bn-brass); }
/* Create, Play, Organise: each card is one link (the Studio, the Studio, the library). It lifts
   and its edge turns amber under the pointer or focus. */
.bn-cards { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 16px;
  max-width: 870px; margin: clamp(1.4rem, 3.8vh, 2.3rem) auto 0; padding: 0; }
.bn-cards li { border: 1px solid rgba(230,227,219,.42); border-radius: 12px; background: rgba(11,15,20,.74);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); transition: border-color .15s, transform .15s, background .15s; }
.bn-cards li:hover, .bn-cards li:focus-within { border-color: var(--bn-brass); background: rgba(11,15,20,.88); transform: translateY(-3px); }
.bn-cards a { display: block; height: 100%; padding: 1.05rem 1rem 1.15rem; border-radius: inherit; text-decoration: none; }
.bn-home .bn-cards a:focus-visible { border-radius: 12px; }
.bn-cards svg { display: block; width: 40px; height: 40px; margin: 0 auto .45rem; color: var(--bn-brass); }
.bn-cards h2 { font: 700 1.9rem/1 var(--bn-display); letter-spacing: .05em; text-transform: uppercase; color: #fff; margin: 0 0 .4rem; }
.bn-cards p { font-size: 1rem; line-height: 1.4; color: #e6e3db; max-width: 13.5rem; margin: 0 auto; }
.bn-hero .bn-cta { justify-content: center; gap: 18px; margin-top: clamp(1.4rem, 3.8vh, 2.2rem); }
.bn-hero .bn-btn { min-width: 186px; padding: 1.05rem 1.6rem; border-radius: 10px; font-size: 1.08rem; text-align: center; }
/* The way down: a quiet label and a bobbing arrow at the hero's foot, to the first section. */
.bn-more { position: absolute; left: 50%; bottom: max(1.1rem, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .4rem 1rem; text-decoration: none; white-space: nowrap;
  font: 600 .82rem/1 var(--bn-body); letter-spacing: .22em; text-transform: uppercase; }
.bn-home .bn-more { color: #d9dad6; }
.bn-home .bn-more:hover { color: #fff; }
.bn-more svg { width: 26px; height: 26px; color: var(--bn-brass); animation: bn-bob 1.8s ease-in-out infinite; }
@keyframes bn-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (max-height: 560px) { .bn-more { display: none; } .bn-hero .bn-wrap { padding-bottom: 2rem; } }
.bn-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.bn-btn { display: inline-block; font: 600 1rem/1 var(--bn-body); text-decoration: none; padding: .95rem 1.4rem;
  border-radius: 3px; border: 2px solid transparent; cursor: pointer; }
.bn-home .bn-primary { background: var(--bn-brass); color: var(--bn-brass-ink); }
.bn-primary:hover { background: var(--bn-brass-hover); }
.bn-ghost { border: 1.5px solid rgba(230,227,219,.8); background: rgba(11,15,20,.72); color: #fff; }
.bn-ghost:hover { border-color: #fff; }
.bn-outline { border-color: var(--bn-control-line); color: var(--text); }

/* playable groove (beside the Create section's copy) */
.bn-pad { padding: 1.1rem 1.2rem 1.2rem;
  background: rgba(11,15,20,.82); backdrop-filter: blur(6px); border: 1px solid var(--bn-control-line); border-radius: 6px; color: #e6e3db; }
/* Title row: "Try a beat" and the play button; the tempo slider sits underneath. */
.bn-pad-top { display: flex; align-items: center; gap: 1rem; margin-bottom: .4rem; }
.bn-pad-top h3 { font: 600 1.25rem/1 var(--bn-display); letter-spacing: .03em; margin: 0 auto 0 0; }
.bn-play { width: 46px; height: 46px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--bn-brass); color: var(--bn-brass-ink); cursor: pointer; }
.bn-play svg { width: 20px; height: 20px; }
.bn-bpm { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; color: #a4aeb5; font-size: .95rem; }
.bn-bpm input { accent-color: var(--bn-brass); width: min(160px, 34vw); }
.bn-bpm output { min-width: 3.2ch; color: #e6e3db; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Three rows (hi-hat, snare, kick): the roomy row gap, as the Studio's grid has for the same three. */
.bn-grid { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: var(--bn-row-gap-roomy) .8rem; align-items: center; }
.bn-lab { font: 600 1.1rem/1 var(--bn-display); letter-spacing: .04em; color: var(--bn-text); }
/* Flex, not a 16-column grid: each step takes an equal share of what's left after the gaps,
   so the row always fits its box and every circle is the same size. (1fr grid tracks can't
   shrink below their content, which pushed the last step past the edge.) */
.bn-steps { display: flex; align-items: center; gap: var(--bn-step-gap); }
.bn-steps button { flex: 1 1 0; min-width: 0; aspect-ratio: 1; padding: 0; border-radius: 50%; border: var(--bn-step-border) solid var(--bn-outline); background: transparent;
  cursor: pointer; transition: background .08s, transform .08s; }
.bn-steps button:nth-child(4n+1):not(:first-child) { margin-left: var(--bn-beat-gap); }
.bn-steps button[aria-pressed="true"] { background: #e6e3db; border-color: #e6e3db; }
/* The hi-hat is drawn as on a drum chart (and the Scribe's grid): a bare X, no circle. */
/* Its size follows the step's (a share of the row's width, as the circles are: 16 steps, or 8 on
   phones), so the ✕ is never taller than the circles beside it and the rows stay evenly spaced. */
.bn-steps { container-type: inline-size; }
.bn-steps button { min-height: 0; }
.bn-row-hat button { display: grid; place-items: center; color: #e6e3db; font: 800 min(4.4cqw, 2.1rem)/1 var(--bn-display);
  -webkit-text-stroke: clamp(.8px, .25vw, 1.6px) currentColor; }
.bn-row-hat button[aria-pressed="true"] { background: transparent; border-color: transparent; }
.bn-row-hat button[aria-pressed="true"]::after { content: '✕'; }
.bn-row-snare button[aria-pressed="true"] { background: var(--bn-brass); border-color: var(--bn-brass); }
/* As in the Scribe's grid (scribe.css .bn-grid-hit): the kick is a circle in kick olive,
   and the playhead is a brass ring. */
.bn-row-kick button[aria-pressed="true"] { background: var(--bn-kick); border-color: var(--bn-kick); }
.bn-steps button:focus-visible, .bn-play:focus-visible { border-radius: 50%; }   /* keep the shape under the .bn-home focus ring */
.bn-steps button.bn-now { transform: scale(1.08); box-shadow: 0 0 0 3px var(--bn-brass); }
.bn-pad small { display: block; margin-top: .9rem; color: #a4aeb5; font-size: .9rem; }

/* sections */
.bn-section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.bn-sec { font: 700 clamp(2.1rem, 5vw, 3.4rem)/1 var(--bn-display); margin: 0 0 1rem; max-width: 18ch; }
.bn-two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
.bn-two h3 { font: 700 1.7rem/1 var(--bn-display); margin: 0 0 .6rem; padding-top: 1rem; border-top: 3px solid var(--bn-brass); }
.bn-two p { margin: 0 0 1rem; color: var(--muted); max-width: 34rem; }
.bn-two ul { margin: 0; padding-left: 1.1rem; }
.bn-two li { margin: .35rem 0; }
/* Bands alternate down the page: Create on --surface, Play on the stage (.bn-dark), Organise
   on --surface, Who it's for on the stage. Hairlines mark the darker bands' edges. */
.bn-dark { background: var(--bn-stage); box-shadow: inset 0 1px 0 var(--bn-line), inset 0 -1px 0 var(--bn-line); }
/* Create and Play: copy beside a picture of the thing (the playable pad; a screenshot), the
   picture on the left in .bn-flip. Each starts with its hero card's icon and name. */
.bn-row { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.bn-flip .bn-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.bn-flip .bn-row > :first-child { order: 2; }
.bn-eyebrow { display: flex; align-items: center; gap: .6rem; margin: 0 0 .9rem;
  font: 700 .95rem/1 var(--bn-body); letter-spacing: .2em; text-transform: uppercase; }
.bn-home .bn-eyebrow { color: var(--bn-brass); }
.bn-eyebrow svg { width: 22px; height: 22px; flex: none; }
.bn-feature p:not(.bn-eyebrow) { color: var(--muted); max-width: 32rem; margin: 0 0 1rem; }
.bn-feature ul { margin: 0 0 1.5rem; padding-left: 1.1rem; }
.bn-feature li { margin: .35rem 0; }
.bn-shot { display: block; width: 100%; height: auto; border: 1px solid var(--bn-control-line); border-radius: 10px; }
.bn-band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.bn-band-grid { display: grid; grid-template-columns: 1.05fr 1fr; grid-template-areas: "copy peek" "cta peek";
  gap: 0 clamp(2rem, 5vw, 4rem); align-items: center; }
.bn-band-copy { grid-area: copy; align-self: end; }
.bn-band-peek { grid-area: peek; }
.bn-band p { color: var(--muted); max-width: 32rem; }
.bn-band .bn-cta { grid-area: cta; align-self: start; margin-top: 1.4rem; }
/* The example library is one link to the real one, so nothing in it looks like a button. */
.bn-lib { display: block; text-decoration: none; background: var(--bn-stage); border: 1px solid var(--bn-control-line); border-radius: 6px;
  padding: .4rem 1rem; color: #e6e3db; font-size: .97rem; }
.bn-lib:hover { border-color: var(--bn-brass); }
.bn-artist { display: flex; justify-content: space-between; align-items: center; min-height: 3rem; padding: .3rem .4rem;
  border-bottom: 1px solid #2a3540; font: 600 1.15rem/1 var(--bn-display); letter-spacing: .03em; }
.bn-artist:last-child { border-bottom: 0; }
.bn-artist span { font: 500 .8rem var(--bn-body); color: #a4aeb5; border: 1px solid #3a4753; border-radius: 99px; padding: .15rem .6rem; }
.bn-groove { padding: .55rem .4rem .7rem; border-bottom: 1px solid #2a3540; font-weight: 500; }
.bn-groove em { display: block; font-style: normal; color: #a4aeb5; font-size: .85rem; }
.bn-band .bn-lib-hint { margin: .5rem 0 0; font-size: .9rem; }

/* Teacher / student tabs: rendered on phones only (home_page.js), one panel at a time. */
.bn-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 1.1rem 0 1.2rem; border: 1.5px solid var(--bn-outline);
  border-radius: var(--bn-radius); overflow: hidden; }
.bn-tabs button { min-height: 50px; border: 0; background: transparent; color: var(--text); font: 600 1.05rem/1 var(--bn-body); cursor: pointer; }
.bn-tabs button[aria-selected="true"] { background: var(--bn-brass); color: var(--bn-brass-ink); }
.bn-tabs button:focus-visible { outline-offset: -5px; }

@media (max-width: 820px) {
  .bn-row, .bn-flip .bn-row { grid-template-columns: 1fr; }
  .bn-flip .bn-row > :first-child { order: 0; }
  .bn-band-grid { grid-template-columns: 1fr; grid-template-areas: "copy" "cta" "peek"; }
  .bn-band-peek { margin-top: clamp(2rem, 5vw, 4rem); }
}
@media (max-width: 760px) {
  .bn-two { grid-template-columns: 1fr; }
  .bn-cards { gap: 10px; }
  .bn-cards a { padding: .9rem .6rem 1rem; }
  .bn-cards h2 { font-size: 1.55rem; }
}
/* Phones: one bar of eight big steps (home_page.js adds .bn-pad-eighths below 600px), each
   drum's name above its row, the count over the top, and a bigger play button. */
@media (max-width: 600px) {
  .bn-pad { padding: 14px 14px 12px; border-radius: 10px; background: rgba(11,15,20,.9); }
  .bn-pad-top h3 { font-size: 1.5rem; font-weight: 700; }
  .bn-play { width: 56px; height: 56px; }
  .bn-play svg { width: 24px; height: 24px; }
  .bn-bpm { margin: .5rem 0 .7rem; color: var(--bn-muted); }
  .bn-bpm input { flex: 1; width: auto; height: 32px; }
  .bn-pad small { margin-top: .6rem; color: var(--bn-muted); }
}
.bn-pad-eighths .bn-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
.bn-pad-eighths .bn-lab { font: 600 .95rem/1 var(--bn-display); letter-spacing: .05em; color: var(--bn-muted); margin-bottom: 5px; }
.bn-pad-eighths .bn-steps { gap: 5px; margin-bottom: 9px; }
.bn-pad-eighths .bn-row-hat button { font-size: min(9.5cqw, 2.1rem); }
.bn-pad-eighths .bn-steps button:nth-child(n) { margin-left: 0; }   /* no extra beat gap: the count marks the beats */
.bn-counts { display: flex; gap: 5px; margin-bottom: 8px; }
.bn-counts span { flex: 1 1 0; text-align: center; font: 600 .9rem/1 var(--bn-display); color: var(--bn-muted); }
.bn-counts .bn-beat { color: var(--bn-text); font-size: 1.1rem; }
/* Phones: buttons share a row as big tap targets; the library example comes before its button. */
@media (max-width: 600px) {
  /* The cymbal side of the photo across the top; the rest of the hero is the stage. The cards
     become three short rows (icon left), and the buttons share a row. */
  .bn-hero::before { background-position: 18% top; background-size: auto 58%; }
  .bn-hero::after { background:
    radial-gradient(ellipse 80% 34% at 50% 22%, rgba(11,15,20,.72) 0%, rgba(11,15,20,0) 100%),
    linear-gradient(180deg, rgba(11,15,20,.3) 0%, rgba(11,15,20,.55) 36%, var(--bn-stage) 58%, var(--bn-stage) 80%, var(--surface) 100%); }
  .bn-hero .bn-wrap { padding-top: 3.4rem; padding-bottom: 4.6rem; }
  .bn-lockup-mark { width: 104px; }
  .bn-hero h1 img { width: 250px; }
  .bn-strap { gap: .7rem; letter-spacing: .26em; font-size: .9rem; }
  .bn-cards { grid-auto-flow: row; gap: 8px; margin-top: 1.4rem; }
  .bn-cards li { border-radius: 10px; }
  .bn-cards a { display: grid; grid-template-columns: 44px 1fr; column-gap: .9rem; align-items: center; text-align: left; padding: .7rem .9rem; }
  .bn-cards svg { grid-row: 1 / 3; width: 36px; height: 36px; margin: 0; }
  .bn-cards h2 { font-size: 1.5rem; margin: 0 0 .1rem; }
  .bn-cards p { max-width: none; margin: 0; }
  .bn-hero .bn-cta { gap: .6rem; margin-top: 1.3rem; }
  .bn-hero .bn-btn { min-width: 0; font-size: 1rem; }
  .bn-section { padding: 2.75rem 0; }
  .bn-sec { font-size: clamp(2.2rem, 10vw, 2.7rem); max-width: none; text-wrap: balance; }
  .bn-cta { flex-wrap: nowrap; gap: .6rem; }
  .bn-cta .bn-btn { flex: 1 1 0; display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 52px; padding: .6rem .8rem; border-radius: var(--bn-radius); }
  .bn-band-grid { grid-template-areas: "copy" "peek" "cta"; }
  .bn-band-peek { margin-top: .3rem; }
  .bn-band .bn-lib-hint { margin-bottom: 1.3rem; }
  .bn-band .bn-cta { margin-top: 0; }
  .bn-two > [role="tabpanel"] h3 { padding-top: 0; border-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bn-more svg { animation: none; }
  .bn-cards li { transition: none; }
  .bn-cards li:hover, .bn-cards li:focus-within { transform: none; }
  .bn-steps button { transition: none; }
  .bn-steps button.bn-now { transform: none; }
}
