/* AudioPeek product page. Built on the site's tokens (css/style.css); every class is ap- prefixed so the site's
   global .hero, .section and header styles never apply here. */

.ap-top {
  position: absolute;
  top: var(--space-s);
  right: var(--space-s);
  z-index: 5;
}

.ap-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 20px 70px;
  background: var(--clr-background-secondary);
}
#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
}
.ap-hero > :not(#field):not(.visually-hidden) { position: relative; }

.ap-intro { text-align: center; }
#eye { width: 132px; height: auto; color: var(--clr-accent-primary); overflow: visible; }
#eye { cursor: pointer; }
#eye .ap-eye-all { transform-origin: 200px 200px; transition: transform 90ms ease-in; }
#eye.ap-blink .ap-eye-all { transform: scaleY(.08); }
.ap-intro h1 { font-weight: var(--font-weight-black); font-size: 3.2rem; margin-top: 6px; color: var(--clr-text-headings); }
.ap-tagline { font-size: 1.35rem; font-weight: var(--font-weight-light); margin: 4px 0 20px; text-wrap: balance; }
/* Text on the blue fill is the page background, as on the main site: white in light mode, dark on dark mode's paler blue.
   Download and the source link: two equal columns, or one column on narrow screens, so the buttons are always the same
   size. Both set their own hover and focus colors, because the site's global a:hover and a:focus-visible (blue text,
   underline) would otherwise win. */
.ap-actions { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; vertical-align: top; }
@media (max-width: 460px) { .ap-actions { grid-auto-flow: row; } }
.ap-download, .ap-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}
.ap-download {
  background: var(--clr-accent-primary);
  color: var(--clr-background-primary);
  padding: 0 28px;
  font-weight: var(--font-weight-bold);
  font-size: 1.1rem;
}
.ap-source {
  color: var(--clr-text-headings);
  background: color-mix(in srgb, var(--clr-background-primary) 75%, transparent);
  border: 1px solid var(--clr-border-primary);
  padding: 0 20px;
  font-weight: var(--font-weight-medium);
}
.ap-download:focus-visible { color: var(--clr-background-primary); text-decoration: none; }
.ap-source:focus-visible { color: var(--clr-text-headings); text-decoration: none; }
@media (hover: hover) {
  .ap-download:hover { color: var(--clr-background-primary); text-decoration: none; background: color-mix(in srgb, var(--clr-accent-primary) 86%, #000); }
  .ap-source:hover { color: var(--clr-text-headings); text-decoration: none; border-color: var(--clr-accent-primary); }
}
/* The small text over the field is a step darker and heavier than the site's secondary text, so it holds up as bars pass */
.ap-fine { color: var(--clr-text-primary); font-weight: var(--font-weight-regular); font-size: .95rem; margin-top: 10px; text-wrap: balance; }
.ap-hint { text-align: center; margin: 42px auto 16px; min-height: 34px; color: var(--clr-text-primary); font-weight: var(--font-weight-regular); }

.ap-hint b { color: var(--clr-text-headings); }
.ap-hint.ap-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.ap-hint span { white-space: nowrap; }
.ap-page kbd {
  display: inline-block;
  line-height: 1.35;
  transition: transform 70ms var(--ease-standard), background-color 70ms var(--ease-standard), border-color 70ms var(--ease-standard), color 70ms var(--ease-standard);
  font: 600 .8rem -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--ap-key);
  border: 1px solid var(--clr-border-primary);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 2px 7px;
  color: var(--clr-text-primary);
}
/* A keycap sinks and turns blue while its key is held (audiopeek.js) */
.ap-page kbd.ap-down {
  transform: translateY(1px);
  border-bottom-width: 1px;
  border-color: var(--clr-accent-primary);
  background: color-mix(in srgb, var(--clr-accent-primary) 16%, var(--ap-key));
  color: var(--clr-accent-primary);
}

/* The demo: a pretend Finder window with the AudioPeek panel floating over it */
.ap-demo {
  --ap-glass: linear-gradient(120deg, rgba(205, 218, 255, .72), rgba(236, 226, 240, .72));
  --ap-glass-border: rgba(255, 255, 255, .75);
  --ap-card: #F6F6F7;
  --ap-shadow: rgba(0, 0, 0, .12);
}
html[data-theme="dark"] .ap-demo {
  --ap-glass: linear-gradient(120deg, rgba(52, 62, 96, .62), rgba(66, 54, 66, .62));
  --ap-glass-border: rgba(255, 255, 255, .16);
  --ap-card: #1B1B1D;
  --ap-shadow: rgba(0, 0, 0, .5);
}
.ap-page { --ap-key: #fff; }
html[data-theme="dark"] .ap-page { --ap-key: #2a2a2a; }
.ap-stage { position: relative; max-width: 1000px; margin: 0 auto; height: 620px; }
.ap-finder {
  position: absolute; left: 0; top: 0; width: 58%;
  background: var(--clr-background-primary);
  border: 1px solid var(--clr-border-primary);
  border-radius: 12px;
  box-shadow: 0 12px 34px var(--ap-shadow);
  overflow: hidden;
  font-size: .95rem;
  display: flex;
  flex-direction: column;
  max-height: 100%; /* never taller than its stage: the file list scrolls instead */
}
.ap-finder > :not(.ap-rows) { flex: none; }
.ap-finder.ap-active { box-shadow: 0 12px 34px var(--ap-shadow), 0 0 0 2px color-mix(in srgb, var(--clr-accent-primary) 55%, transparent); }
.ap-finder-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--clr-border-primary); font-weight: var(--font-weight-bold); }
.ap-lights { display: inline-flex; gap: 7px; }
.ap-lights i { width: 12px; height: 12px; border-radius: 50%; }
.ap-lights i:nth-child(1) { background: #ff5f57; }
.ap-lights i:nth-child(2) { background: #febc2e; }
.ap-lights i:nth-child(3) { background: #28c840; }
.ap-drop { display: grid; padding: 8px 14px; border-bottom: 1px dashed var(--clr-border-primary); color: var(--clr-text-secondary); font-size: .85rem; text-align: center; }
.ap-drop > p { grid-area: 1 / 1; margin: 0; } /* a note takes the hint's place instead of adding a line; no site paragraph gap, so the space below matches the space above */
.ap-drop:has(.ap-drop-note:not(:empty)) .ap-drop-hint { visibility: hidden; }
.ap-choose { background: none; border: 0; padding: 0; font: inherit; font-weight: var(--font-weight-bold); color: var(--clr-accent-primary); text-decoration: underline; cursor: pointer; }
.ap-drop-note { color: var(--clr-text-primary); }
.ap-drop-note:empty { display: none; }
.ap-finder.ap-over { outline: 3px dashed var(--clr-accent-primary); outline-offset: -3px; }
.ap-cols, .ap-rows [role="option"] { display: grid; grid-template-columns: 1fr 90px 60px; gap: 8px; }
.ap-cols { color: var(--clr-text-secondary); font-size: .8rem; padding: 6px 22px; border-bottom: 1px solid var(--clr-border-primary); }
.ap-rows { list-style: none; margin: 0; padding: 6px; outline: none; position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ap-rows [role="option"] { border-radius: 6px; cursor: pointer; padding: 7px 8px; user-select: none; -webkit-user-select: none; }
.ap-rows [role="option"]:hover { background: color-mix(in srgb, var(--clr-accent-primary) 12%, transparent); }
.ap-rows [role="option"][aria-selected="true"] { background: var(--clr-accent-primary); color: var(--clr-background-primary); }
.ap-rows:focus-visible [role="option"][aria-selected="true"] { box-shadow: 0 0 0 2px var(--clr-text-headings); }
.ap-rows [role="option"][aria-disabled="true"] { cursor: default; opacity: .6; }
.ap-name { justify-self: start; min-width: 0; max-width: min(15em, 100%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-name::before { content: "♪" / ""; margin-right: 8px; opacity: .7; } /* decorative: screen readers skip it */
.ap-note { margin-left: 8px; font-size: .8em; }

.ap-panel {
  position: absolute; right: 0; top: 246px; width: 66%; /* just below Team.mp3's row, so its Kind and Length stay in view */
  background: var(--ap-glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--ap-glass-border);
  border-radius: 22px;
  box-shadow: 0 28px 60px var(--ap-shadow);
  padding: 0 10px 10px;
  transition: opacity .18s, transform .18s;
}
.ap-panel.ap-hidden { opacity: 0; transform: scale(.97); pointer-events: none; }
.ap-head { display: flex; align-items: center; gap: 12px; padding: 12px 10px; font: 14px -apple-system, BlinkMacSystemFont, sans-serif; }
.ap-head button { background: none; border: 0; padding: 4px; display: grid; place-items: center; color: var(--clr-text-headings); border-radius: 6px; cursor: pointer; }
#play.ap-pulse { animation: ap-pulse 1.3s ease-in-out infinite; }
@keyframes ap-pulse { 50% { transform: scale(1.35); color: var(--clr-accent-primary); } }
#fname { font-weight: var(--font-weight-bold); color: var(--clr-text-headings); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#meta { margin-left: auto; color: var(--clr-text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
#vol { width: 74px; accent-color: var(--clr-accent-primary); }
#mute[aria-pressed="true"] { color: #d0553f; }
#loop { color: var(--clr-text-secondary); }
#loop[aria-pressed="true"] { color: var(--clr-accent-primary); }
.ap-pane { position: relative; border-radius: 12px; overflow: hidden; cursor: pointer; touch-action: pan-y; }
.ap-pane canvas { display: block; width: 100%; height: 100%; }
.ap-wave { height: 120px; background: var(--ap-card); margin-bottom: 8px; }
.ap-spec { height: 150px; background: #000004; }
#unmute {
  position: absolute; top: 8px; right: 8px;
  background: var(--clr-accent-primary); color: var(--clr-background-primary); border: 0; border-radius: 999px;
  padding: 6px 12px 6px 9px;
  font: 600 12px -apple-system, BlinkMacSystemFont, sans-serif;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  cursor: pointer;
}
#unmute[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  #play.ap-pulse { animation: none; }
  .ap-page kbd.ap-down { transform: none; }
}
/* Touch screens have no keys: the hint keeps only its first line */
@media (hover: none) and (pointer: coarse) {
  .ap-hint span { display: none; }
}

/* The sections below the hero */
/* Full-width bands that alternate the site's two backgrounds, as on the home page; the text column stays 720 px */
.ap-block { padding: var(--space-xl) max(20px, calc((100% - 720px) / 2)); background: var(--clr-background-primary); }
.ap-block:nth-of-type(even) { background: var(--clr-background-secondary); }
/* The hero above and the site footer are gray, so with an even number of bands the footer turns white to keep the alternation */
.ap-footer { background-color: var(--clr-background-primary); }
.ap-block p + p, .ap-block p + .ap-list, .ap-block .ap-list + p { margin-top: var(--space-s); }
.ap-block h3 { font-size: 1.2rem; margin-bottom: 6px; text-align: left; }
.ap-steps { list-style: none; counter-reset: step; display: grid; gap: var(--space-l); }
.ap-steps > li { counter-increment: step; position: relative; padding-left: 52px; }
.ap-steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -4px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--clr-accent-primary); color: var(--clr-background-primary); font-weight: var(--font-weight-bold);
}
.ap-shots { display: grid; grid-template-columns: 1fr 1.25fr; gap: var(--space-s); margin-top: var(--space-s); align-items: start; }
.ap-shots.ap-one { grid-template-columns: minmax(0, 360px); }
/* The install prompts, drawn rather than screenshotted: simplified, following the page's theme, with the button to
   click shown in blue and ringed. Wording as the AudioPeek README quotes it. */
.ap-defs { position: absolute; width: 0; height: 0; }
.ap-page { --ap-mac-bg: #F5F5F7; --ap-mac-text: #1D1D1F; --ap-mac-sub: #48484D; --ap-mac-btn: #E2E2E6; --ap-mac-line: rgba(0, 0, 0, .1); --ap-mac-shadow: rgba(0, 0, 0, .16); }
html[data-theme="dark"] .ap-page { --ap-mac-bg: #2C2C2E; --ap-mac-text: #F5F5F7; --ap-mac-sub: #C0C0C6; --ap-mac-btn: #48484A; --ap-mac-line: rgba(255, 255, 255, .12); --ap-mac-shadow: rgba(0, 0, 0, .5); }
.ap-mac { margin: 0; padding: 22px 16px; border-radius: var(--border-radius); background: var(--clr-background-secondary); display: grid; place-items: center; min-width: 0;
  font: 13px/1.35 -apple-system, BlinkMacSystemFont, sans-serif; color: var(--ap-mac-text); }
.ap-mac-alert, .ap-mac-window { background: var(--ap-mac-bg); box-shadow: 0 10px 28px var(--ap-mac-shadow), 0 0 0 1px var(--ap-mac-line); }
.ap-mac-alert { width: min(100%, 250px); border-radius: 16px; padding: 18px 16px 14px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.ap-mac-icon { width: 56px; height: 36px; color: var(--clr-accent-primary); }
.ap-mac p { font-size: 12px; color: var(--ap-mac-sub); margin: 0; }
.ap-mac-alert p { margin-bottom: 4px; }
.ap-mac-btn { display: block; width: 100%; padding: 5px 12px; border-radius: 7px; background: var(--ap-mac-btn); font-size: 12px; font-weight: 500; white-space: nowrap; }
.ap-mac .ap-target { background: #0A6CDF; color: #fff; box-shadow: 0 0 0 2px var(--ap-mac-bg), 0 0 0 4px var(--clr-accent-primary); }
.ap-mac-window { width: 100%; max-width: 400px; display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); border-radius: 12px; overflow: hidden; }
.ap-mac-side { background: color-mix(in srgb, var(--ap-mac-btn) 50%, var(--ap-mac-bg)); padding: 14px 6px; display: grid; gap: 8px; align-content: start; }
.ap-mac-side i { height: 8px; border-radius: 4px; background: var(--ap-mac-line); }
.ap-mac-side span { font-size: 11px; padding: 3px 6px; border-radius: 6px; background: #0A6CDF; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-mac-main { padding: 14px 12px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.ap-mac-main small { font-size: 11px; font-weight: 600; color: var(--ap-mac-sub); margin-top: 6px; }
.ap-mac-row { display: grid; gap: 10px; padding: 10px; border-radius: 8px; background: color-mix(in srgb, var(--ap-mac-btn) 45%, var(--ap-mac-bg)); }
.ap-mac-row .ap-mac-btn { width: auto; justify-self: end; }
.ap-after { margin-top: var(--space-l); text-align: center; color: var(--clr-text-secondary); }
.ap-list { list-style: none; display: grid; gap: 8px; }
.ap-list li { padding-left: 1.2em; position: relative; }
.ap-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--clr-accent-primary); }
.ap-video { margin-block: var(--space-m); }
/* The demo recording: silent, looping, no controls; js/main.js plays it, or holds its first frame under reduced motion.
   Rounded and shadowed like the site's cards; the figure clips, since Safari can leave a video's own corners square. */
.ap-video { border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow-standard); background: var(--clr-background-secondary); transform: translateZ(0); }
.ap-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; }
.ap-features { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-m); }
.ap-features > div { background: var(--clr-background-primary); border: 1px solid var(--clr-border-primary); border-radius: var(--border-radius); box-shadow: var(--shadow-standard); padding: var(--space-m); }
.ap-block:nth-of-type(odd) .ap-features > div { background: var(--clr-background-secondary); } /* cards take the other background from their band */
.ap-reqs { margin-bottom: var(--space-m); }
#faq details { border-top: 1px solid var(--clr-border-primary); padding: var(--space-s) 0; }
#faq details:last-of-type { border-bottom: 1px solid var(--clr-border-primary); }
#faq summary {
  cursor: pointer; font-weight: var(--font-weight-bold); color: var(--clr-text-headings);
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0;
  transition: color var(--dur-fast) var(--ease-standard);
}
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after { /* a chevron that turns when the answer opens */
  content: ""; flex: none; width: 8px; height: 8px; margin: -4px 4px 0 0;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform var(--dur-fast) var(--ease-out);
}
#faq details[open] summary::after { margin-top: 4px; transform: rotate(225deg); }
#faq summary:focus-visible { color: var(--clr-accent-primary); }
@media (hover: hover) { #faq summary:hover { color: var(--clr-accent-primary); } }
#faq details p { margin-top: var(--space-xs); }
.ap-footer p + p { margin-top: var(--space-xs); }

@media (max-width: 820px) {
  .ap-intro h1 { font-size: 2.4rem; }
  .ap-stage { height: auto; }
  .ap-finder, .ap-panel { position: static; width: 100%; }
  .ap-finder { max-height: 560px; }
  .ap-panel { margin-top: 12px; }
  #meta { display: none; }
}
@media (max-width: 560px) {
  .ap-shots, .ap-features { grid-template-columns: 1fr; }
  .ap-mac { padding: 18px 12px; }
  .ap-mac-window { grid-template-columns: minmax(0, 1fr); } /* too narrow for the sidebar: the pane alone, with its title */
  .ap-mac-side { display: none; }
  .ap-steps > li { padding-left: 50px; }
  .ap-rows [role="option"] { padding-block: 11px; } /* about 44 px tall, a comfortable tap */
}
