/* Oficina da Música: home page prototype */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ground: #110e0d;
  --ground-2: #191413;
  --ground-3: #241c1a;
  --line: #40332f;
  --line-soft: #2b2220;
  --ink: #f6f0ea;
  --ink-2: #d2c8c0;
  --ink-3: #ab9f97;
  --red: #e2001a;
  --red-hi: #ff5a4d;
  --red-deep: #a3130a;

  --nav-h: 72px;
  --pad: clamp(20px, 4.4vw, 64px);
  --radius: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;

  color-scheme: dark;
}

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

html {
  background: var(--ground);
  scroll-padding-top: calc(var(--nav-h) + 16px);
  scrollbar-color: var(--line) var(--ground);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-stretch: 100%;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--red);
  overflow-x: clip;
}

/* The instruments lean out past the stage on purpose. On a phone that must not
   widen the page (the browser would zoom everything out to fit), and clipping
   on body alone does not hold there, so the content is clipped here too. */
main {
  overflow-x: clip;
}

::selection {
  background: var(--red);
  color: #fff;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--ground);
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 8px;
  border: 3px solid var(--ground);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-3);
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
}

h1,
h2,
p,
ul,
ol,
dl,
dd,
figure,
blockquote,
address {
  margin: 0;
  padding: 0;
  font-style: normal;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ground);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  height: 44px;
  padding: 0 1.25em;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 650;
  font-stretch: 110%;
  font-size: 1rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.btn-lg {
  height: 54px;
  padding: 0 1.6em;
  font-size: 1.0625rem;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background: #d40018;
  transform: translateY(-1px);
  box-shadow: 0 14px 22px -12px rgba(0, 0, 0, 0.7);
}

.btn-primary:active,
.btn-line:active {
  transform: translateY(0) scale(0.98);
}

.btn-line {
  border-color: var(--ink-3);
  background: transparent;
  color: var(--ink);
}

.btn-line:hover {
  border-color: var(--ink);
  background: rgba(246, 240, 234, 0.07);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 650;
  text-decoration: underline;
}

.text-link .ico,
.cap-link .ico,
.cats-foot .ico {
  width: 1em;
  height: 1em;
  transition: transform 0.3s var(--ease-out);
}

.text-link:hover .ico,
.cap-link:hover .ico,
.cats-foot a:hover .ico {
  transform: translateX(3px);
}

/* ---------- Sound switch ---------- */

.sound {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  height: 44px;
  padding: 0 1.05em 0 0.9em;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-weight: 650;
  font-stretch: 110%;
  font-size: 0.9375rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.sound:hover {
  border-color: var(--ink-3);
  background: rgba(246, 240, 234, 0.06);
}

.sound[aria-pressed="true"] {
  border-color: var(--red);
  background: rgba(226, 0, 26, 0.16);
}

.sound-ico {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 16px;
  height: 14px;
}

.sound-ico i {
  flex: 1;
  height: 30%;
  border-radius: 1px;
  background: var(--ink-3);
  transform-origin: bottom;
}

.sound-ico i:nth-child(2) { height: 55%; }
.sound-ico i:nth-child(3) { height: 40%; }
.sound-ico i:nth-child(4) { height: 70%; }

.sound[aria-pressed="true"] .sound-ico i {
  background: var(--red-hi);
  height: 100%;
}

.motion .sound[aria-pressed="true"] .sound-ico i {
  animation: sound-bar 0.9s ease-in-out infinite alternate;
}

.motion .sound[aria-pressed="true"] .sound-ico i:nth-child(2) { animation-delay: -0.35s; animation-duration: 0.7s; }
.motion .sound[aria-pressed="true"] .sound-ico i:nth-child(3) { animation-delay: -0.6s; animation-duration: 1.1s; }
.motion .sound[aria-pressed="true"] .sound-ico i:nth-child(4) { animation-delay: -0.15s; animation-duration: 0.8s; }

.sound.nudge {
  border-color: var(--red-hi);
}

.motion .sound.nudge {
  animation: nudge 0.5s var(--ease-out) 2;
}

@keyframes sound-bar {
  from { transform: scaleY(0.25); }
  to { transform: scaleY(1); }
}

@keyframes nudge {
  50% { transform: scale(1.07); box-shadow: 0 0 0 6px rgba(255, 90, 77, 0.18); }
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  height: var(--nav-h);
  padding: 0 var(--pad);
  background: rgba(17, 14, 13, 0.9);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

@supports (backdrop-filter: blur(1px)) {
  .nav {
    background: rgba(17, 14, 13, 0.72);
    backdrop-filter: blur(16px) saturate(1.3);
  }
}

.nav.is-stuck {
  border-bottom-color: var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  width: auto;
  height: 50px;
  overflow: visible;
  color: var(--ink);
}

.logo-word {
  width: auto;
  height: 40px;
  color: var(--ink);
}

.nav-links ul {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 36px);
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  font-weight: 600;
  font-stretch: 108%;
  font-size: 0.9875rem;
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.2s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  grid-template-rows: minmax(0, 1fr) auto;
  column-gap: clamp(20px, 3vw, 56px);
  height: calc(100svh - var(--nav-h));
  min-height: 600px;
  max-height: 980px;
  padding: clamp(12px, 2.4vh, 28px) var(--pad) 0;
  isolation: isolate;
}

/* The stage light hangs above the instrument and spills across the whole top
   section, behind the headline too, so copy and stage stand in one room. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(95% 78% at 70% -6%, rgba(255, 128, 84, 0.15), rgba(226, 0, 26, 0.075) 42%, rgba(226, 0, 26, 0) 74%);
  /* Fades in below the navigation, so the bar never cuts it with a hard edge. */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 110px);
  mask-image: linear-gradient(to bottom, transparent, #000 110px);
  pointer-events: none;
}

.hero-copy {
  align-self: center;
  padding-bottom: clamp(8px, 3vh, 40px);
}

.hero h1 {
  --wdth: 125;
  font-size: clamp(2.75rem, min(5.35vw, 10.4vh), 5.5rem);
  font-weight: 800;
  font-stretch: calc(var(--wdth) * 1%);
  line-height: 0.94;
  letter-spacing: -0.022em;
}

.hl {
  display: block;
  white-space: nowrap;
}

.beat {
  --beat: 0;
  display: inline-block;
  color: var(--red);
  font-stretch: calc((112 + 13 * (1 - var(--beat))) * 1%);
  font-weight: calc(800 + 100 * var(--beat));
}

.lede {
  max-width: 34ch;
  margin-top: clamp(16px, 2.6vh, 28px);
  font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(18px, 3.2vh, 32px);
}

.facts {
  display: grid;
  gap: 8px;
  margin-top: clamp(18px, 3.4vh, 36px);
  font-size: 0.9375rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.facts li,
.facts a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.facts a {
  /* A taller target without moving anything: the padding is taken back by the margin. */
  padding-block: 6px;
  margin-block: -6px;
  text-decoration: none;
}

.facts a:hover span {
  text-decoration: underline;
}

.facts b {
  color: var(--ink);
  font-weight: 750;
}

.stars {
  width: 92px;
  height: auto;
  flex: none;
}

.stars-off {
  fill: var(--line);
}

.stars-on {
  fill: #ffb21a;
}

.open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.open-dot {
  width: 9px;
  height: 9px;
  margin: 0 3px;
  border-radius: 50%;
  background: var(--ink-3);
  flex: none;
}

.open.is-open .open-dot {
  background: #43d17a;
  box-shadow: 0 0 0 4px rgba(67, 209, 122, 0.18);
}

.open.is-closed .open-dot {
  background: var(--red);
}

/* ---------- Stage ---------- */

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 3;
}

.stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 18px;
  min-width: 0;
}

.stage-title {
  font-size: clamp(1.1875rem, 1.5vw, 1.375rem);
  font-weight: 750;
  font-stretch: 118%;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.stage-mix {
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

/* The sound switch on the stage is the loud one: filled, where the eye already is. */
.sound-stage {
  flex: none;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--ground);
}

.sound-stage .sound-ico i {
  background: var(--ground);
}

.sound.sound-stage:hover {
  border-color: #fff;
  background: #fff;
}

.sound.sound-stage[aria-pressed="true"] {
  border-color: var(--red);
  background: rgba(226, 0, 26, 0.16);
  color: var(--ink);
}

.stage-view {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: var(--radius);
  --cap-h: 68px;
  /* The floor line: where the bars stand (bars.js, FLOOR), measured up from
     the bottom of the stage view. */
  --floor-h: 10.92%;
  --floor-y: calc(var(--cap-h) + var(--floor-h));
}

.stage-view:focus-visible {
  outline-offset: 6px;
  border-radius: var(--radius);
}

/* Light from above: brightest over the instrument, gone before the floor. */
.spot {
  position: absolute;
  inset: -18% -10% var(--floor-y) -10%;
  background:
    radial-gradient(56% 104% at 50% 0%, rgba(255, 164, 112, 0.24), rgba(226, 0, 26, 0.12) 44%, rgba(226, 0, 26, 0) 78%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 8%, #000 34%);
  mask-image: linear-gradient(to bottom, transparent 8%, #000 34%);
  pointer-events: none;
}

/* The floor: a pool of that light lying on it, from the line toward the viewer. */
.floor {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: var(--cap-h);
  height: var(--floor-h);
  background:
    radial-gradient(52% 100% at 50% 0%, rgba(255, 150, 100, 0.3), rgba(226, 0, 26, 0.12) 52%, rgba(226, 0, 26, 0) 100%);
  pointer-events: none;
}

.floor::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(to right, rgba(255, 176, 136, 0), rgba(255, 176, 136, 0.34) 30%, rgba(255, 176, 136, 0.34) 70%, rgba(255, 176, 136, 0));
}

.bars {
  position: absolute;
  left: 0;
  bottom: var(--cap-h);
  width: 100%;
  height: 78%;
  pointer-events: none;
}

.inst {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) var(--cap-h);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.inst.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* What the instrument casts on the floor. */
.inst::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: var(--floor-y);
  width: var(--shadow-w, 60%);
  height: 7%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.5) 52%, rgba(0, 0, 0, 0));
  opacity: var(--shadow-o, 0.7);
  transform: translate(-50%, 64%);
  pointer-events: none;
}

.inst-art {
  container-type: size;
  display: grid;
  /* One fixed cell, so an instrument wider than the stage still sits centred
     and leans out equally on both sides. */
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  min-height: 0;
  perspective: 1500px;
  pointer-events: none;
}

.inst-body {
  position: relative;
  width: min(calc(100cqw / var(--kx)), calc(100cqh / var(--ky)));
  aspect-ratio: var(--ar);
  transform: var(--pose);
  transform-style: preserve-3d;
  filter: drop-shadow(0 26px 26px rgba(0, 0, 0, 0.55));
  pointer-events: auto;
}

.inst-body img {
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.inst-guitarra { --ar: 2000 / 659; --kx: 1; --ky: 0.66; --pose: rotate(-21deg); --shadow-w: 64%; }
.inst-baixo { --ar: 1264 / 379; --kx: 0.99; --ky: 0.64; --pose: rotate(-21deg); --shadow-w: 64%; }
.inst-bateria { --ar: 1600 / 1310; --kx: 1.06; --ky: 0.93; --pose: none; --shadow-w: 78%; --shadow-o: 0.95; }
.inst-piano { --ar: 1679 / 353; --kx: 0.98; --ky: 0.4; --pose: rotateX(50deg) rotateZ(-17deg); --shadow-w: 74%; }
.inst-saxofone { --ar: 573 / 1639; --kx: 1.5; --ky: 3.3; --pose: rotate(7deg); --shadow-w: 24%; --shadow-o: 0.95; }

/* The instruments that stand upright stand on the floor line; the drum kit's
   front spurs are a little nearer the viewer, so a little lower. The others
   hang in the light above it. */
.inst-bateria .inst-art,
.inst-saxofone .inst-art {
  place-items: end center;
}

.inst-bateria .inst-body {
  margin-bottom: calc(10.92cqh + var(--cap-h) * 0.1092 - 2.2cqh);
}

.inst-saxofone .inst-body {
  margin-bottom: calc(10.92cqh + var(--cap-h) * 0.1092);
}

.inst-piano .inst-body {
  filter: brightness(0.94) drop-shadow(0 30px 30px rgba(0, 0, 0, 0.6));
}

/* Playable zones */

.zone {
  position: absolute;
  touch-action: pan-y;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.zone svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.zone-corner {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* "You can touch this": a dot on the strings, keys or drum, until the first note. */
.play-hint {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: rgba(255, 250, 242, 0.95);
  box-shadow: 0 0 0 5px rgba(17, 14, 13, 0.4);
  pointer-events: none;
}

.play-hint::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 250, 242, 0.9);
  opacity: 0.5;
}

.motion .play-hint::before {
  opacity: 0;
  animation: play-hint 2.2s ease-out infinite;
}

.has-played .play-hint {
  display: none;
}

@keyframes play-hint {
  0% { opacity: 0; transform: scale(0.45); }
  30% { opacity: 0.9; }
  100% { opacity: 0; transform: scale(1.5); }
}

.vib {
  fill: rgba(255, 246, 232, 0.3);
  stroke: rgba(255, 250, 242, 0.95);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  opacity: 0;
}

.pad {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.pad::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 250, 242, 0.9);
  opacity: 0;
  transition: opacity 0.2s;
}

.pad:hover::after {
  opacity: 0.35;
}

.pad.hit::after {
  animation: pad-hit 0.5s var(--ease-out);
}

@keyframes pad-hit {
  0% { opacity: 1; transform: scale(0.82); background: rgba(255, 90, 77, 0.35); }
  100% { opacity: 0; transform: scale(1.12); background: rgba(255, 90, 77, 0); }
}

.pearl {
  width: 7%;
  aspect-ratio: 1;
}


.motion .pearl::after {
  animation: pearl-hint 2.4s ease-out infinite;
  animation-delay: calc(var(--i) * 0.14s);
}

.motion .pearl.hit::after {
  animation: pad-hit 0.5s var(--ease-out);
}

@keyframes pearl-hint {
  0%, 55% { opacity: 0; transform: scale(0.8); }
  70% { opacity: 0.7; transform: scale(1.25); }
  100% { opacity: 0; transform: scale(1.7); }
}

.key-hi {
  position: absolute;
  border-radius: 0 0 3px 3px;
  background: rgba(226, 0, 26, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}

.key-hi.is-black {
  background: rgba(255, 90, 77, 0.9);
}

.key-hi.down {
  opacity: 1;
  transition-duration: 0s;
}

/* Caption */

.cap {
  align-self: end;
  display: grid;
  gap: 2px;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.cap-name {
  font-size: clamp(1.1875rem, 1.5vw, 1.375rem);
  font-weight: 750;
  font-stretch: 118%;
  line-height: 1.15;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cap-brand {
  color: var(--red);
}

.cap-meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.9em;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.cap-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: var(--ink);
  font-weight: 600;
}

/* Mixer */

.mixer {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

/* One channel: its name brings the instrument on stage, its switch turns its part on or off. */
.strip {
  display: flex;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  transition: background-color 0.2s, border-color 0.2s;
}

.strip:hover {
  border-color: var(--ink-3);
}

.strip.is-in {
  border-color: var(--line);
}

.strip.is-current {
  background: var(--ground-3);
  border-color: var(--ink-3);
}

.ch {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 4px 0 10px;
  border: 0;
  border-radius: 9px 0 0 9px;
  background: transparent;
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-weight: 650;
  font-stretch: 104%;
  line-height: 1.05;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}

.ch:hover,
.strip.is-in .ch {
  color: var(--ink);
}

.ch-sw {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  padding: 0;
  border: 0;
  border-radius: 0 9px 9px 0;
  background: transparent;
  cursor: pointer;
}

.sw {
  position: relative;
  width: 28px;
  height: 16px;
  border: 1.5px solid var(--ink-3);
  border-radius: 999px;
  transition: background-color 0.2s, border-color 0.2s;
}

.sw::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--ink-3);
  transition: transform 0.25s var(--ease-out), background-color 0.2s;
}

.ch-sw:hover .sw {
  border-color: var(--ink);
}

.ch-sw:hover .sw::after {
  background: var(--ink);
}

.ch-sw[aria-checked="true"] .sw {
  border-color: var(--red);
  background: var(--red);
}

.ch-sw[aria-checked="true"] .sw::after {
  background: #fff;
  transform: translateX(12px);
}

.ch-meter {
  position: relative;
  flex: none;
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.ch-meter i {
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: scaleY(var(--lvl, 0));
  transform-origin: bottom;
}

.strip.is-in .ch-meter i {
  --lvl: 0.12;
}

.ch-name {
  min-width: 0;
  text-wrap: balance;
}

.stage-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 16px;
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

/* Brand strip */

.brandstrip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  margin-top: clamp(10px, 2vh, 22px);
  padding: clamp(12px, 2vh, 20px) 0;
  border-top: 1px solid var(--line-soft);
}

.brandstrip li {
  display: grid;
  place-items: center;
  height: 44px;
}

.brandstrip img {
  width: auto;
  max-width: 100%;
  height: 22px;
  opacity: 0.72;
  transition: opacity 0.2s;
}

.brandstrip li:hover img {
  opacity: 1;
}

.brandstrip .b-roland img { height: 17px; }
.brandstrip .b-yamaha img { height: 24px; }
.brandstrip .b-squier img { height: 40px; }
.brandstrip .b-sandberg img { height: 25px; }
.brandstrip .b-marshall img { height: 27px; }
.brandstrip .b-blackstar img { height: 22px; }
.brandstrip .b-sabian img { height: 44px; }
.brandstrip .b-esp img { height: 26px; }

/* ---------- Sections ---------- */

section {
  position: relative;
}

.cats,
.wall,
.team,
.artists,
.proof,
.services,
.visit {
  padding: clamp(72px, 10vw, 136px) var(--pad) 0;
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
  align-items: end;
  gap: 16px 48px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.sec-head h2,
.visit h2 {
  font-size: clamp(2rem, 4.4vw, 3.75rem);
  font-weight: 800;
  font-stretch: 122%;
  line-height: 0.98;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.sec-head p {
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Categories */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
}

.cat {
  grid-column: span 3;
}

.cat-md {
  grid-column: span 4;
}

.cat a {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ground-2);
  color: var(--ink);
  text-decoration: none;
  isolation: isolate;
}

/* The photographs are the shop's own and share one grade (tools/make_categories.py). */
.cat img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out), filter 0.4s;
  filter: brightness(0.88);
}

.cat-lg a { aspect-ratio: 3 / 4; }
.cat-md a { aspect-ratio: 16 / 10; }

.cat-acustico img { object-position: 50% 50%; }
.cat-instalacao img { object-position: 68% 50%; }
.cat-arco img { object-position: 50% 42%; }

.cat-wide {
  grid-column: span 6;
}

.cat-wide a {
  aspect-ratio: 16 / 10;
}

/* A photograph drops in later; until then the tile keeps the red wash. */
.cat-wait a {
  background:
    radial-gradient(80% 60% at 50% 18%, rgba(226, 0, 26, 0.22), rgba(226, 0, 26, 0) 70%),
    var(--ground-2);
}

.cat-lg a::before,
.cat-md a::before,
.cat-wide a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(17, 14, 13, 0.94) 0%, rgba(17, 14, 13, 0.55) 34%, rgba(17, 14, 13, 0) 62%);
}

/* Four sections have no photograph of the shop's own yet: plain rows. */
.cat-sm a {
  display: flex;
  align-items: center;
  min-height: 76px;
  border: 1px solid var(--line-soft);
  transition: border-color 0.25s, background-color 0.25s;
}

.cat-sm a:hover,
.cat-sm a:focus-visible {
  border-color: var(--line);
  background: var(--ground-3);
}

.cat-sm .cat-text {
  position: static;
  padding-block: 18px;
}

.cat-sm .cat-go {
  top: 50%;
  bottom: auto;
  translate: 0 -50%;
}


.cat-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 2px;
  padding: clamp(14px, 1.6vw, 22px);
  padding-right: 64px;
}

.cat-name {
  font-size: clamp(1.125rem, 1.7vw, 1.625rem);
  font-weight: 750;
  font-stretch: 118%;
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.cat-sm .cat-name {
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
}

.cat-go {
  position: absolute;
  right: clamp(12px, 1.4vw, 18px);
  bottom: clamp(12px, 1.4vw, 18px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(246, 240, 234, 0.5);
  transition: background-color 0.25s, border-color 0.25s, transform 0.4s var(--ease-out);
}

.cat a:hover img,
.cat a:focus-visible img {
  transform: scale(1.05);
  filter: brightness(1);
}

.cat a:hover .cat-go,
.cat a:focus-visible .cat-go {
  background: var(--red);
  border-color: var(--red);
  transform: translateX(3px);
}

.cat a:focus-visible {
  outline-offset: 4px;
  border-radius: var(--radius);
}

.cats-foot {
  margin-top: 24px;
  color: var(--ink-2);
}

.cats-foot a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: var(--ink);
  font-weight: 650;
}

/* Brand wall */

/* One tone for every name. The separator leads each name and hangs in the gap
   to its left; on the first name of a line it falls outside the list and is
   clipped, so no line starts or ends on a stray slash. */
.wall-list {
  --gap: 1.1em;
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--gap);
  row-gap: 0.3em;
  overflow: hidden;
  font-size: clamp(1.125rem, 1.9vw, 1.75rem);
  font-weight: 750;
  font-stretch: 118%;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.wall-list li {
  position: relative;
}

.wall-list li::before {
  content: "/";
  position: absolute;
  right: 100%;
  width: var(--gap);
  text-align: center;
  color: var(--line);
  font-weight: 300;
  font-stretch: 100%;
}

.wall-more {
  display: none;
}

/* Staff. Name and role sit on the portrait, the same way the artist tiles do.
   The mark stands in until a photograph is in the slot. */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
}

.member-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(80% 60% at 50% 18%, rgba(226, 0, 26, 0.22), rgba(226, 0, 26, 0) 70%),
    var(--ground-2);
  isolation: isolate;
}

.member-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.member-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(17, 14, 13, 0.95) 0%, rgba(17, 14, 13, 0.62) 34%, rgba(17, 14, 13, 0) 62%);
}

.member-mark {
  position: absolute;
  inset: 8% 0 38% 0;
  z-index: 0;
  display: grid;
  place-items: center;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 750;
  font-stretch: 118%;
  letter-spacing: -0.03em;
  color: var(--ink-2);
}

.member-card:has(img) .member-mark {
  display: none;
}

.member-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 4px;
  padding: clamp(14px, 1.6vw, 22px);
}

.member-name {
  font-size: clamp(1.125rem, 1.7vw, 1.625rem);
  font-weight: 750;
  font-stretch: 118%;
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.member-role {
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Local artists */

/* The band gets the wide tile, the three soloists stand upright beside it.
   The pictures share the grade of the category tiles (tools/make_artists.py). */
.artist-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
}

.artist-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ground-2);
  color: var(--ink);
  text-decoration: none;
  isolation: isolate;
}

.artist-lead .artist-card {
  aspect-ratio: auto;
  height: 100%;
}

.artist-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out), filter 0.4s;
  filter: brightness(0.9);
}

.artist-lead img { object-position: 50% 0; }
.artist-ricardo img { object-position: 50% 0; }
.artist-sara img { object-position: 60% 50%; }

.artist-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(17, 14, 13, 0.95) 0%, rgba(17, 14, 13, 0.6) 30%, rgba(17, 14, 13, 0) 58%);
}

.artist-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 4px;
  padding: clamp(14px, 1.6vw, 22px);
}

.artist-name {
  font-size: clamp(1.125rem, 1.7vw, 1.625rem);
  font-weight: 750;
  font-stretch: 118%;
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.artist-what {
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ink-2);
  text-wrap: pretty;
}

.artist-net {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  margin-top: 8px;
  font-size: 0.8125rem;
  font-weight: 650;
  font-stretch: 104%;
  color: var(--ink);
}

/* A tile without a link yet keeps the same row free, so the names stay level. */
div.artist-card .artist-text::after {
  content: "";
  height: calc(0.8125rem * 1.5 + 7.5px);
}

.artist-net .ico {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.4s var(--ease-out);
}

a.artist-card:hover img,
a.artist-card:focus-visible img {
  transform: scale(1.04);
  filter: brightness(1);
}

a.artist-card:hover .artist-net,
a.artist-card:focus-visible .artist-net {
  color: var(--red-hi);
}

a.artist-card:hover .artist-net .ico,
a.artist-card:focus-visible .artist-net .ico {
  transform: translate(2px, -2px);
}

/* A tile that opens the artist's page here carries the arrow that points on. */
a.artist-card:not([target]):hover .artist-net .ico,
a.artist-card:not([target]):focus-visible .artist-net .ico {
  transform: translateX(3px);
}

a.artist-card:focus-visible {
  outline-offset: 4px;
  border-radius: var(--radius);
}

/* Proof */

.quote blockquote p {
  text-wrap: pretty;
}

.quote figcaption {
  margin-top: 14px;
  font-size: 0.9375rem;
  color: var(--ink-3);
}

/* Small text needs the lighter red to stay readable on the dark ground;
   display sizes take the logo red itself. */
.quote mark {
  background: none;
  color: var(--red-hi);
}

.quote-lead mark {
  color: var(--red);
}

.quote-lead {
  max-width: 62rem;
  margin-bottom: clamp(40px, 6vw, 80px);
}

.quote-lead blockquote {
  font-size: clamp(1.75rem, 4vw, 3.5rem);
  font-weight: 700;
  font-stretch: 108%;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.quote-lead blockquote p::before {
  content: "“";
}

.quote-lead blockquote p::after {
  content: "”";
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--line-soft);
}

.proof-grid .quote {
  grid-column: span 3;
}

.proof-grid .quote:nth-child(2) {
  grid-column: span 3;
}

.proof-grid blockquote {
  font-size: 1.125rem;
  line-height: 1.45;
  color: var(--ink);
}

.rating {
  grid-column: span 3;
  display: grid;
  gap: 14px;
  justify-items: start;
}

.rating-score {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink-2);
}

.rating-score b {
  font-size: 2.5rem;
  font-weight: 800;
  font-stretch: 122%;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stars-lg {
  width: 132px;
}

.rating-bars {
  display: grid;
  gap: 6px;
  width: 100%;
  font-size: 0.875rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.rating-bars li {
  display: grid;
  grid-template-columns: 5.4em minmax(0, 1fr) 2.2em;
  align-items: center;
  gap: 10px;
}

.rb-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--line-soft);
  overflow: hidden;
}

.rb-bar i {
  display: block;
  height: 100%;
  width: calc(var(--n) / 182 * 100%);
  border-radius: 3px;
  background: var(--red);
}

.rb-n {
  text-align: right;
}

/* Services */

.services-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.service-list > div {
  padding: 22px 0 24px;
  border-top: 1px solid var(--line-soft);
}

.service-list > div:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.service-list dt {
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 750;
  font-stretch: 116%;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.service-list dd {
  max-width: 44ch;
  margin-top: 6px;
  color: var(--ink-2);
  text-wrap: pretty;
}

.shop-photos {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: clamp(10px, 1.4vw, 18px);
}

.shop-photos li {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ground-2);
}

.shop-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-a {
  grid-row: 1 / 3;
}

/* Visit */

.visit {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding-bottom: clamp(72px, 10vw, 136px);
}

.visit-addr {
  margin-top: clamp(18px, 2.4vw, 28px);
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.3;
  color: var(--ink-2);
}

.visit .actions {
  margin-top: 28px;
}

.hours {
  width: 100%;
  max-width: 30rem;
  margin-top: 40px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.hours caption {
  padding-bottom: 14px;
  text-align: left;
  font-weight: 650;
}

.hours th,
.hours td {
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  vertical-align: top;
  text-align: left;
  font-weight: 400;
  color: var(--ink-2);
}

.hours td {
  text-align: right;
}

.hours tr.is-today th,
.hours tr.is-today td {
  color: var(--ink);
  font-weight: 650;
}

.hours tr.is-today th::after {
  content: "hoje";
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ground-3);
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-2);
}

.contacts {
  display: grid;
  gap: 4px;
  margin-top: 28px;
  font-variant-numeric: tabular-nums;
}

.contacts li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--ink-3);
}

.contacts a {
  color: var(--ink);
}

.contacts span {
  font-size: 0.875rem;
}

.visit-media {
  --front-w: min(44%, 340px);
  --front-right: clamp(12px, 3vw, 40px);
  position: relative;
  padding-bottom: clamp(56px, 9vw, 120px);
}

.map {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ground-2);
}

.map img {
  width: 100%;
  aspect-ratio: 1200 / 680;
  object-fit: cover;
  filter: invert(1) hue-rotate(180deg) saturate(0.4) brightness(0.92) contrast(0.9);
  transition: transform 1.1s var(--ease-out);
}

.map:hover img {
  transform: scale(1.04);
}

/* Beside the address column the map stands taller. The picture is cropped at
   the sides to fit (0.708 of its width stays), so the pin moves with it:
   50% + (46.85% - 50%) / 0.708. */
@media (min-width: 960px) {
  .map img {
    aspect-ratio: 1200 / 960;
  }

  .map {
    --pin-x: 45.55%;
  }
}

.map-pin {
  position: absolute;
  left: var(--pin-x, 46.85%);
  top: 54.27%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50% 50% 50% 4px;
  background: var(--red);
  color: #fff;
  transform: translate(-50%, -100%) rotate(-45deg);
  transform-origin: 50% 100%;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.5);
}

.map-pin .ico {
  transform: rotate(45deg);
}

.map-pin .ico path {
  display: none;
}

.map-pin .ico circle {
  fill: #fff;
  stroke: none;
  r: 4.5px;
  cy: 12px;
}

.map-label {
  position: absolute;
  left: calc(var(--pin-x, 46.85%) + 34px);
  top: calc(54.27% - 48px);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ground);
  font-size: 0.875rem;
  font-weight: 700;
  font-stretch: 112%;
  white-space: nowrap;
}

/* The shop-front photo overlaps the corner below the map; the credit stays clear of it. */
.map-credit {
  max-width: calc(100% - var(--front-w) - var(--front-right) - 12px);
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--ink-3);
}

.front {
  position: absolute;
  right: var(--front-right);
  bottom: 0;
  width: var(--front-w);
  border-radius: var(--radius);
  border: 6px solid var(--ground);
  box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.8);
}

/* Footer */

.foot {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px 48px;
  padding: 36px var(--pad) 44px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1.3;
}

.foot-brand .logo-mark {
  height: 52px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 24px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.foot-credit {
  grid-column: 1 / -1;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ground);
  font-size: 0.9375rem;
  font-weight: 650;
  transform: translateX(-50%);
  box-shadow: 0 18px 36px -12px rgba(0, 0, 0, 0.7);
}

.toast[hidden] {
  display: none;
}

.motion .toast {
  animation: toast-in 0.45s var(--ease-out);
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
}

/* Flying notes of the opening */

.fly-note {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 55;
  width: 26px;
  height: 26px;
  color: var(--ink);
  pointer-events: none;
  will-change: transform, opacity;
}

/* ---------- Opening: start states, released by logo.js ---------- */

.intro .logo-word,
.intro .nav-links,
.intro .nav-tools,
.intro .hl,
.intro .lede,
.intro .hero .actions,
.intro .facts,
.intro .stage,
.intro .brandstrip {
  opacity: 0;
  animation: intro-failsafe 0.01s 4.5s forwards;
}

.intro .lg-note {
  opacity: 0;
}

@keyframes intro-failsafe {
  to { opacity: 1; }
}

/* ---------- Narrower screens ---------- */

.menu-btn {
  display: none;
}

@media (max-width: 1380px) {
  .strip {
    height: 48px;
  }

  .ch {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
  }

  .ch-meter {
    width: 22px;
    height: 4px;
  }

  .ch-meter i {
    transform: scaleX(var(--lvl, 0));
    transform-origin: left;
  }
}

@media (max-width: 1260px) {
  /* Three channels over two, so every name keeps its room beside the switch. */
  .mixer {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .strip {
    grid-column: span 2;
  }

  .strip:nth-child(n + 4) {
    grid-column: span 3;
  }
}

@media (max-width: 959px) {
  :root {
    --nav-h: 60px;
  }

  .nav {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .logo-mark {
    height: 38px;
  }

  .logo-word {
    height: 30px;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 8px var(--pad) 20px;
    background: var(--ground);
    border-bottom: 1px solid var(--line-soft);
    display: none;
  }

  .nav.is-open .nav-links {
    display: block;
  }

  .nav-links ul {
    flex-direction: column;
    gap: 0;
  }

  .nav-links a {
    width: 100%;
    height: 52px;
    font-size: 1.25rem;
    font-stretch: 118%;
    font-weight: 700;
    border-top: 1px solid var(--line-soft);
  }

  .nav-links a::after {
    content: none;
  }

  .menu-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1.5px solid var(--line);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }

  /* Without scripts the button could not open anything; the footer carries the same links. */
  html:not(.js) .menu-btn {
    display: none;
  }

  .menu-btn span {
    display: block;
    width: 16px;
    height: 10px;
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    transition: height 0.2s;
  }

  .nav.is-open .menu-btn span {
    height: 2px;
    border-bottom: 0;
  }

  .nav-phone {
    width: 44px;
    padding: 0;
  }

  .nav-phone span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .hero {
    display: block;
    height: auto;
    min-height: 0;
    max-height: none;
    padding-top: 28px;
  }

  .hero-copy {
    position: relative;
    padding-bottom: 28px;
  }

  /* Stacked layout: the light sits behind the copy and is gone before the
     stage begins, which has its own; no edge where the two meet. */
  .hero::before {
    content: none;
  }

  .hero-copy::before {
    content: "";
    position: absolute;
    inset: -28px calc(var(--pad) * -1) 0;
    z-index: -1;
    background:
      radial-gradient(130% 80% at 72% 0%, rgba(255, 128, 84, 0.15), rgba(226, 0, 26, 0.075) 46%, rgba(226, 0, 26, 0) 78%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 100px, #000 52%, transparent 96%);
    mask-image: linear-gradient(to bottom, transparent, #000 100px, #000 52%, transparent 96%);
    pointer-events: none;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 11.6vw, 4.75rem);
  }

  .lede {
    font-size: 1.125rem;
  }

  .stage {
    height: calc(100svh - var(--nav-h));
    min-height: 480px;
    max-height: 720px;
    padding: 12px 0 10px;
    background: var(--ground);
  }

  .stage-view {
    --cap-h: 76px;
  }

  .cap-name {
    white-space: normal;
    text-wrap: balance;
  }

  .strip {
    height: 44px;
  }

  /* A tall stage: the long instruments stand steeper and larger to fill it. */
  .inst-guitarra { --kx: 0.83; --ky: 1.04; --pose: rotate(-52deg); --shadow-w: 62%; }
  .inst-baixo { --kx: 0.82; --ky: 1; --pose: rotate(-52deg); --shadow-w: 62%; }
  .inst-piano { --kx: 0.76; --ky: 0.6; --pose: rotateX(40deg) rotateZ(-50deg); --shadow-w: 70%; }
  .inst-bateria { --kx: 0.92; --shadow-w: 92%; }
  .inst-saxofone { --shadow-w: 40%; }

  .stage-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .js .wall-list:not(.is-open) li:nth-child(n + 17) {
    display: none;
  }

  .js .wall-more {
    display: inline-flex;
    margin-top: 24px;
  }

  .brandstrip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 8px;
    margin-top: 20px;
  }

  .sec-head {
    grid-template-columns: 1fr;
  }

  .cat,
  .cat-md {
    grid-column: span 6;
  }

  .cat-lg a { aspect-ratio: 4 / 5; }
  .cat-md a { aspect-ratio: 4 / 3; }

  .cat-arco,
  .cat-sm {
    grid-column: span 12;
  }

  .cat-arco a {
    aspect-ratio: 16 / 9;
  }

  .cat-sm a {
    min-height: 60px;
  }

  .cat-lg .cat-text,
  .cat-md .cat-text,
  .cat-wide .cat-text {
    padding-right: 14px;
  }

  .cat-lg .cat-go,
  .cat-md .cat-go,
  .cat-wide .cat-go {
    display: none;
  }

  .artist-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .artist-lead {
    grid-column: 1 / -1;
  }

  .artist-lead .artist-card {
    aspect-ratio: 16 / 10;
    height: auto;
  }

  .proof-grid .quote,
  .proof-grid .quote:nth-child(2),
  .rating {
    grid-column: span 12;
  }

  .rating {
    max-width: 26rem;
  }

  .services-body,
  .visit {
    grid-template-columns: 1fr;
  }

  .foot {
    grid-template-columns: 1fr;
  }

  .foot-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-name {
    font-size: 1.05rem;
  }

  .member-text {
    padding: 12px;
  }

  .artist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .artist-lead .artist-card {
    aspect-ratio: 5 / 4;
  }

  /* The pair is narrow and its captions wrap: taller tiles keep the faces clear. */
  .artist-card {
    aspect-ratio: 3 / 5;
  }

  .artist-sara {
    grid-column: 1 / -1;
  }

  .artist-sara .artist-card {
    aspect-ratio: 3 / 2;
  }

  .artist-sara img {
    object-position: 50% 50%;
  }
}

@media (max-width: 520px) {
  .actions .btn-lg {
    flex: 1 1 auto;
    padding: 0 1.1em;
  }

  .stage-note {
    font-size: 0.75rem;
  }

  .map-label {
    display: none;
  }

  .visit-media {
    --front-w: 52%;
  }
}

/* Small phones: the three channels of the top row give the name every pixel they can. */
@media (max-width: 400px) {
  .ch {
    padding: 0 2px 0 8px;
  }

  .ch-sw {
    width: 38px;
  }
}

/* The narrowest phones: two channels to a row. */
@media (max-width: 359px) {
  .mixer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .strip,
  .strip:nth-child(n + 4) {
    grid-column: auto;
  }

  .strip:last-child {
    grid-column: 1 / -1;
  }
}

/* ---------- Reduced motion ---------- */

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

  /* A press still gets its answer: a short fade on the pad, with no movement. */
  .pad.hit::after {
    animation-name: pad-hit-still;
    animation-duration: 0.45s !important;
  }
}

@keyframes pad-hit-still {
  0% { opacity: 1; background: rgba(255, 90, 77, 0.35); }
  100% { opacity: 0; background: rgba(255, 90, 77, 0); }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
