/* Vibophone site. A gallery: the instrument and its sound are the objects,
   text is wayfinding and wall labels in one neutral grotesk. */
:root {
  --ink: #08090c;
  --ink-2: #0f1114;
  --ivory: #ece6d8;
  --grey: rgba(236, 230, 216, .56);
  --faint: rgba(236, 230, 216, .14);
  --accent: #a8f759;                       /* only inside instrument visuals */
  --sans: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --glyph: "Iowan Old Style", Georgia, serif; /* the app's own chord letters */
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body {
  margin: 0; background: var(--ink); color: var(--ivory);
  font: 400 15px/1.4 var(--sans); letter-spacing: -.005em; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--ivory); color: var(--ink); }

/* ---------- label type ---------- */
.cat { margin: 0; font: 500 13px/1.15 var(--sans); color: var(--grey); display: flex; gap: 10px; }
.cat b { font-weight: 500; color: var(--ivory); }
.title { margin: 10px 0 0; font: 500 clamp(22px, 2.3vw, 30px)/1.08 var(--sans); letter-spacing: -.02em; }
.facts { list-style: none; margin: 18px 0 0; padding: 0; font: 400 13px/1.35 var(--sans); color: var(--grey); }
.facts li { margin: 0; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--dot, var(--accent)); margin-right: 8px; vertical-align: 1px; }

/* ---------- header ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; pointer-events: none;
  background: linear-gradient(var(--ink) 35%, rgba(8,9,12,0));
}
.bar > * { pointer-events: auto; }
.mark { color: var(--ivory); text-decoration: none; font: 600 15px/1 var(--sans); letter-spacing: -.01em; padding: 10px 0; }
.mark img { display: none; }
.bar .right { display: flex; align-items: center; gap: 2px; }
.bar nav { display: flex; font: 500 13px/1 var(--sans); }
.bar nav a { color: var(--grey); text-decoration: none; padding: 12px 7px; }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--ivory); }
.sound { width: 40px; height: 40px; margin-left: 2px; border: 0; background: transparent; color: var(--grey);
  cursor: pointer; display: grid; place-items: center; padding: 0; }
.sound svg { width: 20px; height: 20px; }
.sound .w { display: none; }
.sound[aria-pressed="true"] { color: var(--ivory); }
.sound[aria-pressed="true"] .w { display: inline; }
.sound[aria-pressed="true"] .x { display: none; }

/* ---------- hero: the field is the object; a placard and a direction sign ---------- */
.hero { position: relative; min-height: 100svh; overflow: hidden; touch-action: manipulation; cursor: crosshair; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-foot { position: absolute; left: 16px; right: 16px; bottom: calc(22px + env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; pointer-events: none; }
.hero-foot a { pointer-events: auto; }
.placard h1 { margin: 0; font: 600 clamp(24px, 3vw, 32px)/1.05 var(--sans); letter-spacing: -.025em; }
.placard p { margin: 6px 0 0; font: 400 14px/1.25 var(--sans); color: var(--grey); }
.placard p + p { margin-top: 2px; }
/* Whitney-style direction sign: stacked labels and one thin arrow */
.way { display: flex; align-items: flex-end; gap: 10px; }
.way ul { list-style: none; margin: 0; padding: 0; font: 500 14px/1.12 var(--sans); }
.way a { text-decoration: none; color: var(--ivory); display: block; padding: 3px 0; }
.way a:hover { color: var(--accent); }
.way svg { width: 22px; height: 92px; flex: none; stroke: var(--ivory); stroke-width: 1; fill: none; }
/* the invitation: a fingertip that keeps pressing the empty field */
.tap { position: absolute; left: 50%; top: 40%; width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none; transition: opacity .8s; }
.tap.gone { opacity: 0; }
.tap i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(168,247,89,.7); opacity: 0; animation: tapring 2.8s cubic-bezier(.2,.6,.3,1) infinite; }
.tap i:nth-child(2) { animation-delay: .25s; }
.tap i:nth-child(3) { border: 0; background: radial-gradient(circle, rgba(236,230,216,.32), rgba(236,230,216,.08) 55%, transparent 70%); animation: tapdot 2.8s ease-in-out infinite; }
@keyframes tapring { 0%, 18% { transform: scale(.5); opacity: 0 } 24% { opacity: .9 } 75%, 100% { transform: scale(2.4); opacity: 0 } }
@keyframes tapdot { 0% { transform: scale(1.3); opacity: 0 } 12% { transform: scale(1); opacity: 1 } 22% { transform: scale(.82); opacity: 1 } 40%, 100% { transform: scale(1); opacity: 0 } }

/* ---------- rooms: the animation is the object, the label hangs at the edge ---------- */
.feature { position: relative; max-width: 1240px; margin: 0 auto; padding: 16vh 16px 10vh;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
.feature > * { min-width: 0; }
.label { max-width: 300px; }
.stage { position: relative; width: 100%; aspect-ratio: 1; max-width: 560px; justify-self: center; }
.stage canvas, .stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.state { position: absolute; left: 0; right: 0; bottom: -10px; text-align: center; font: 500 12px/1 var(--sans); color: var(--grey); }
.state b { color: var(--ivory); font-weight: 500; }
.rv { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.rv.in { opacity: 1; transform: none; }

/* ---------- chords: karaoke tab and the circle (the app's glyphs) ---------- */
.tab { position: absolute; left: 50%; top: 18%; transform: translate(-50%, -50%);
  width: 64%; aspect-ratio: 2.1; border-radius: 34px; border: 1.5px solid rgba(168,247,89,.55); background: rgba(168,247,89,.08);
  display: grid; place-items: center; overflow: hidden; }
.tab .row { position: relative; width: 100%; height: 56%; }
.tab .ch { position: absolute; top: 50%; font: italic 300 clamp(40px, 11vw, 84px)/1 var(--glyph);
  transform: translate(-50%, -50%); transition: left .7s cubic-bezier(.6,0,.2,1), opacity .7s, color .7s; white-space: nowrap; }
.tab .bar-p { position: absolute; left: 50%; bottom: 17%; width: 34%; height: 3px; transform: translateX(-50%); border-radius: 3px; background: rgba(168,247,89,.18); overflow: hidden; }
.tab .bar-p i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); border-radius: 3px; }
.circle { position: absolute; inset: 0; }
.circle svg { overflow: visible; }
.node { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center;
  font: italic 300 clamp(14px, 3.6vw, 24px)/1 var(--glyph); color: var(--c); background: var(--c2);
  border: 1px solid var(--c); opacity: .5; transition: opacity .5s, box-shadow .5s, transform .5s; }
.node.maj { width: 12%; aspect-ratio: 1; }
.node.min { width: 9%; aspect-ratio: 1; font-size: clamp(11px, 2.6vw, 17px); }
.node.on { opacity: 1; box-shadow: 0 0 28px var(--c); transform: translate(-50%, -50%) scale(1.12); }

/* ---------- closing label + footer ---------- */
.coda { max-width: 1240px; margin: 0 auto; padding: 14vh 16px 12vh; }
footer.foot { max-width: 1240px; margin: 0 auto; padding: 22px 16px 40px; border-top: 1px solid var(--faint);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font: 400 13px/1.5 var(--sans); color: var(--grey); }
footer.foot a { color: var(--grey); text-decoration: none; margin-right: 14px; }
footer.foot a:hover { color: var(--ivory); }

/* ---------- reading rooms: privacy, support ---------- */
.page { max-width: 640px; margin: 0 auto; padding: 104px 16px 40px; }
.page .eyebrow { font: 500 13px/1.2 var(--sans); color: var(--grey); }
.page h1 { font: 600 clamp(26px, 4vw, 34px)/1.06 var(--sans); letter-spacing: -.025em; margin: 10px 0 20px; }
.page h2 { font: 600 17px/1.2 var(--sans); letter-spacing: -.01em; margin: 2.4em 0 .6em; }
.page .lede { font-size: 17px; line-height: 1.4; color: var(--ivory); }
.page p, .page li { font-size: 15px; line-height: 1.5; color: rgba(236,230,216,.74); }
.page a { text-underline-offset: 3px; text-decoration-thickness: 1px; color: var(--ivory); }
.page strong { color: var(--ivory); font-weight: 600; }
.page ul { padding-left: 1.1em; }
.page li { margin: .4em 0; }
.page li::marker { color: var(--grey); }
.page details { border-top: 1px solid var(--faint); padding: 13px 0; }
.page details:last-of-type { border-bottom: 1px solid var(--faint); }
.page summary { cursor: pointer; color: var(--ivory); font-weight: 500; }
.page details p { margin: .6em 0 0; color: var(--grey); }
.page .note { border-left: 1px solid var(--faint); padding: 2px 0 2px 14px; color: var(--grey); }
.page code { font: .9em ui-monospace, Menlo, monospace; background: var(--ink-2); padding: .1em .35em; border-radius: 6px; overflow-wrap: anywhere; }

@media (min-width: 900px) {
  .bar { padding: 12px 32px; }
  .hero-foot { left: 32px; right: 32px; bottom: 32px; }
  .placard p { font-size: 15px; }
  .way ul { font-size: 16px; }
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0 48px; min-height: 90vh; padding: 12vh 32px; align-items: center; }
  .feature .label { grid-column: 1; align-self: end; padding-bottom: 6vh; }
  .feature .stage { grid-column: 2; grid-row: 1; max-width: 620px; }
  .feature.flip { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .feature.flip .label { grid-column: 2; align-self: start; padding: 6vh 0 0; }
  .feature.flip .stage { grid-column: 1; }
  .coda, footer.foot { padding-left: 32px; padding-right: 32px; }
}
@media (max-width: 380px) { .bar nav a { padding: 12px 5px; } }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .tab .ch { transition: none; }
  .tap i, .tap i:nth-child(3) { animation: none; opacity: .5; transform: none; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
