/* PreviewFly's sounds (ACS: Audio Cascading Style Sheets, https://github.com/Grkmyldz148/acs).
   Silent until the visitor turns sound on in the header (the toggle raises master-volume); never on load.
   Soft by design: low-mid sine tones, a few milliseconds of attack (no clicks), short tails, no noise bursts,
   the highs rolled off, and nothing on hover. */
:root {
  master-volume: 0;
  master-eq-high: -6db;
  master-eq-low: 1db;
  sound-mood: warm;
  sound-mood-mix: 0.3;
  room: small-room;
  room-mix: 0.12;
}

/* a press: a low round tone that settles */
@sound pf-press {
  body {
    osc: sine;
    freq: 440hz;
    pitch-from: 520hz;
    attack: 6ms;
    decay: 110ms;
    gain: 0.2;
  }
  under {
    osc: sine;
    freq: 220hz;
    attack: 8ms;
    decay: 140ms;
    gain: 0.1;
  }
}

/* a light touch: chips, swatches, thumbnails */
@sound pf-tap {
  body {
    osc: sine;
    freq: 620hz;
    filter: lowpass;
    cutoff: 1400hz;
    attack: 5ms;
    decay: 60ms;
    gain: 0.13;
  }
}

/* choosing an option: two soft notes, a fifth apart */
@sound pf-select {
  ring {
    tones: 523hz;
    ratios: 1, 1.5;
    decays: 0.16s, 0.1s;
    gains: 1, 0.35;
    gain: 0.12;
  }
}

/* something opens: a slow upward glide */
@sound pf-open {
  glide {
    osc: sine;
    freq: 560hz;
    pitch-from: 420hz;
    attack: 12ms;
    decay: 130ms;
    gain: 0.11;
  }
}

/* something closes */
@sound pf-close {
  glide {
    osc: sine;
    freq: 400hz;
    pitch-from: 520hz;
    attack: 10ms;
    decay: 110ms;
    gain: 0.09;
  }
}

/* sound turned on, a message sent: a small chord */
@sound pf-chime {
  ring {
    tones: 523hz;
    ratios: 1, 1.5, 2;
    decays: 0.6s, 0.4s, 0.25s;
    gains: 1, 0.4, 0.18;
    gain: 0.16;
  }
}

.btn-ink, .btn-light, .drop { sound-on-click: pf-press; volume: 0.8; }
.btn-line, .btn-dark-line { sound-on-click: pf-press; pitch: -5st; volume: 0.6; }
.nb, .burger, .acc summary, .faq summary { sound-on-click: pf-open; volume: 0.8; }
.chip, .seg, .pill, .th, .sw2, .kind { sound-on-click: pf-tap; volume: 0.8; }
.opt, .tab { sound-on-click: pf-select; volume: 0.8; }
.replay { sound-on-click: pf-open; volume: 0.8; }
.done:not([hidden]) { sound-on-appear: pf-chime; volume: 0.8; }
