/* Product detail pages (/converter, /recorder, /editor-app). Shared tokens live in site.css. */

/* Hero */
.p-hero { padding: clamp(48px, 7vw, 96px) 0 0; }
.p-hero__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.p-hero__icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px;
  background: var(--card-dark); color: #fff;
}
.p-hero__icon .material-icons { font-size: 28px; }
.p-hero .eyebrow .badge { margin-left: 2px; text-transform: none; letter-spacing: 0; }
.p-hero h1 { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); }
.p-hero .lead { margin-top: 18px; max-width: 520px; }
.p-hero .btn-row { margin-top: 28px; }
.p-hero__media .window { max-height: 520px; }
@media (max-width: 900px) { .p-hero__grid { grid-template-columns: 1fr; } }
.p-hero--text { padding-bottom: clamp(32px, 4vw, 48px); text-align: center; }
.p-hero--text .p-hero__grid { grid-template-columns: 1fr; }
.p-hero--text .p-hero__icon { margin-left: auto; margin-right: auto; }
.p-hero--text .eyebrow, .p-hero--text .btn-row { justify-content: center; }
.p-hero--text h1 { text-wrap: balance; }
.p-hero--text .lead { max-width: 620px; margin-left: auto; margin-right: auto; text-wrap: balance; }

/* In-page nav */
.p-subnav {
  position: sticky; top: var(--header-h); z-index: 800; margin-top: clamp(48px, 6vw, 80px);
  background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.p-subnav .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.p-subnav .container::-webkit-scrollbar { display: none; }
.p-subnav a {
  flex: none; height: 48px; display: inline-flex; align-items: center; padding: 0 14px;
  font-size: var(--fs-small); font-weight: 500; color: var(--text-2); border-bottom: 2px solid transparent;
}
.p-subnav a:hover { color: var(--text); }
.p-subnav a.is-active { color: var(--text); border-bottom-color: var(--red); }
section[id] { scroll-margin-top: calc(var(--header-h) + 64px); }

/* Before / after */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.compare figure { margin: 0; }
.compare figcaption { margin-top: 14px; text-align: center; font-size: var(--fs-small); color: var(--text-2); }
.compare figcaption strong { display: block; color: var(--text); font-size: var(--fs-body); margin-bottom: 2px; }
.compare__frame { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.compare__frame > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.compare__inset { position: absolute; left: 53%; top: 7%; width: 42%; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; }
.compare__inset img { display: block; width: 100%; height: 100%; object-fit: cover; }
.compare__inset--empty { background: #000; }
.compare__sound { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, .72); color: #fff; font-size: var(--fs-tiny); font-weight: 500; }
.compare__sound .material-icons { font-size: 15px; }
.compare__inset--empty::after { content: ''; position: absolute; inset: 0; background: #000; clip-path: inset(0 100% 0 0); transition: clip-path 900ms var(--ease-out) 700ms; }
.is-revealed .compare__inset--empty::after, .no-js .compare__inset--empty::after { clip-path: inset(0); }
.compare__swap { display: inline-grid; max-width: 9.5em; white-space: nowrap; overflow: hidden; transition: max-width 500ms var(--ease-out) 1300ms; }
.compare__swap > span { grid-area: 1 / 1; transition: opacity 400ms var(--ease-out) 1200ms; }
.compare__swap > span:last-child { opacity: 0; }
.is-revealed .compare__swap, .no-js .compare__swap { max-width: 4.5em; }
.is-revealed .compare__swap > span:first-child, .no-js .compare__swap > span:first-child { opacity: 0; }
.is-revealed .compare__swap > span:last-child, .no-js .compare__swap > span:last-child { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .compare__inset--empty::after { clip-path: inset(0); transition: none; }
  .compare__swap, .compare__swap > span { transition: none; }
  .compare__swap { max-width: 4.5em; }
  .compare__swap > span:first-child { opacity: 0; }
  .compare__swap > span:last-child { opacity: 1; }
}
.compare__arrow { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; }
@media (max-width: 800px) { .compare { grid-template-columns: 1fr; } .compare__arrow { justify-self: center; transform: rotate(90deg); } }

/* Steps (zigzag) */
.steps { display: grid; gap: clamp(64px, 8vw, 112px); }
.step { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.step:nth-child(even) > :first-child { order: 2; }
.step__num { font-size: var(--fs-small); font-weight: 700; color: var(--red); letter-spacing: 0.04em; margin-bottom: 12px; }
.step h3 { font-size: var(--fs-h2); letter-spacing: -0.02em; margin-bottom: 14px; }
.step ul { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.step li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-small); color: var(--text-2); }
.step li .material-icons { font-size: 18px; color: var(--red); margin-top: 1px; }
.steps--even .step { grid-template-columns: 1fr 1fr; }
.steps--even .panel { padding: clamp(16px, 2.5vw, 28px); }
@media (max-width: 900px) { .step, .steps--even .step { grid-template-columns: 1fr; } .step:nth-child(even) > :first-child { order: 0; } }

/* Feature bento */
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { font-size: var(--fs-small); color: var(--text-2); }
.feature .material-icons.card-icon { font-size: 24px; margin-bottom: 14px; }
.card--dark.feature p { color: var(--text-on-dark-2); }

/* Output files */
.files { display: grid; gap: 10px; }
.file {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08);
}
.file .material-icons { color: var(--red); }
.file strong { display: block; font-size: var(--fs-small); color: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 500; overflow-wrap: anywhere; }
/* Wrap only between the date/title prefix and the file type, which is the part that matters. */
.file strong i { font-style: normal; color: var(--text-on-dark-2); white-space: nowrap; }
.file span { display: block; font-size: var(--fs-tiny); color: var(--text-on-dark-2); }

/* Requirements */
.reqs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.reqs .card h3 { font-size: 1rem; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.reqs .card h3 .material-icons { font-size: 20px; color: var(--red); }
.reqs .card p { font-size: var(--fs-small); color: var(--text-2); }
@media (max-width: 900px) { .reqs { grid-template-columns: 1fr; } }

/* Install steps (Recorder page, under Requirements) */
.install { margin-top: clamp(56px, 7vw, 88px); scroll-margin-top: calc(var(--header-h) + 64px); }
.install__title { font-size: var(--fs-h3); letter-spacing: -0.01em; margin-bottom: 20px; }
.install__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.install__notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.install h4 { display: flex; align-items: center; gap: 8px; font-size: 1rem; line-height: 1.35; margin-bottom: 10px; }
.install h4 .material-icons { font-size: 20px; color: var(--red); }
.install .card p { font-size: var(--fs-small); color: var(--text-2); }
.install__steps { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; font-size: var(--fs-small); color: var(--text-2); }
.install__steps li { padding-left: 4px; }
.install__steps li::marker { color: var(--text); font-weight: 600; }
.install b { color: var(--text); font-weight: 600; }
.install .card code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; color: var(--text); background: var(--bg-soft); padding: 1px 5px; border-radius: 6px; overflow-wrap: anywhere; }
.install .hash code { background: none; padding: 0; border-radius: 0; font-size: 0.8125rem; }
.install__tip { margin-top: 14px; font-size: var(--fs-small); color: var(--text-2); }
.install__hash { margin-top: 16px; }
@media (max-width: 900px) { .install__grid, .install__notes { grid-template-columns: 1fr; } }

/* Next step: bridge to publishing */
.next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: next; }
.next .card { position: relative; }
.next .card::before {
  counter-increment: next; content: counter(next);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--card-dark); color: #fff; font-size: var(--fs-tiny); font-weight: 700;
}
.next .card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.next .card p { font-size: var(--fs-small); color: var(--text-2); }
@media (max-width: 900px) { .next { grid-template-columns: 1fr; } }

/* Cross-sell to the other path */
.other-path { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.other-path h3 { color: #fff; font-size: 1.35rem; margin-bottom: 6px; }

/* Final CTA */
.p-cta { text-align: center; }
.p-cta .panel { padding: clamp(48px, 8vw, 88px) var(--gutter); }
.p-cta .btn-row { justify-content: center; margin-top: 28px; }
/* On phones the two store badges wrap onto their own rows; keep them centered like the rest of the panel. */
.p-cta .get-badges { justify-content: center; }

/* Phones: features as a compact two-column list of titles */
@media (max-width: 899px) {
  #features .bento { grid-template-columns: 1fr 1fr; gap: 10px; }
  #features .feature { grid-column: auto; padding: 16px; }
  #features .feature h3 { font-size: var(--fs-small); }
  #features .feature p { display: none; }
  #features .card--dark { grid-column: 1 / -1; }
  #features .card--dark p { display: block; }
}

/* Recorder: one quiet link to the public GitHub release, for people who want to see the files first. */
.install__release { margin-top: 20px; font-size: var(--fs-small); color: var(--text-2); }
.install__release a { display: inline-flex; align-items: center; gap: 4px; color: var(--red); font-weight: 500; }
.install__release a:hover { text-decoration: underline; }
.install__release .material-icons { font-size: 16px; }

/* Phones: hero and step headings follow the smaller phone scale. */
@media (max-width: 600px) {
  .p-hero { padding-top: 32px; }
  .p-hero h1 { font-size: 2rem; }
  .p-hero .lead { margin-top: 14px; }
  .step h3 { margin-bottom: 10px; }
}
@media (max-width: 600px) { .file span { font-size: 0.8125rem; } }
