/* The homepage owns the visual system. Only mastering-specific layout lives here. */
.mastering-page [hidden] {
  display: none !important;
}
.mastering-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.mastering-page .skip-link {
  position: fixed;
  z-index: 60;
  top: 10px;
  left: 20px;
  padding: 12px 18px;
  background: #fff;
  border-radius: 16px;
  transform: translateY(-150%);
}
.mastering-page .skip-link:focus {
  transform: none;
}
.mastering-page :focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 5px;
}
/* Form controls keep the homepage's single soft pink ring instead. */
.mastering-page
  :is(
    input,
    textarea,
    select,
    .contact-combobox-trigger,
    .contact-combobox-option
  ):focus-visible {
  outline: none;
}
.mastering-page section[id] {
  scroll-margin-top: calc(var(--header-height) + 24px);
}
/* The wordmark, background and gallery inherit the homepage styles unchanged. */
.mastering-hero-intro {
  display: grid;
  align-content: center;
  gap: 24px;
  position: relative;
  z-index: 2;
  padding: 16px 0 0;
}
.mastering-hero .hero-wordmark {
  min-height: 0;
}
/* Turnaround and CTAs stay above the wordmark while it zooms on scroll. */
.mastering-turnaround {
  position: relative;
  z-index: 3;
  justify-self: center;
  margin: 0;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
  isolation: isolate;
}
/* A slow, soft sheen (the CTAs' gradient) crosses the pill every 7 seconds. */
.mastering-turnaround::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 80%
  );
  transform: translateX(-120%);
  animation: mastering-turnaround-sheen 7s ease-in-out 1.5s infinite;
  pointer-events: none;
}
@keyframes mastering-turnaround-sheen {
  0% {
    transform: translateX(-120%);
  }
  35%,
  100% {
    transform: translateX(120%);
  }
}
.mastering-hero-actions {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
/* Equal CTAs, wide enough for the longer primary label. */
.mastering-hero-actions .button {
  min-width: 220px;
}
.mastering-preview {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(22px);
  transition:
    transform var(--motion-fast) ease,
    background-color var(--motion-fast) ease;
}
.mastering-preview:hover,
.mastering-preview:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}
.mastering-page .about-image img {
  height: auto;
}
.mastering-page .about-copy > .button {
  justify-self: start;
}
.mastering-page .about-copy p {
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.65;
}
.mastering-page details.process-item > summary {
  list-style: none;
  border-radius: var(--radius-xl);
}
.mastering-page details.process-item > summary::-webkit-details-marker {
  display: none;
}
.mastering-page details[open] .process-answer {
  grid-template-rows: 1fr;
}
.mastering-page details[open] .process-answer > p {
  padding-bottom: 24px;
}
.mastering-page details[open] .process-question::after {
  content: "−";
}
.mastering-page .process-answer > p {
  transition: padding-bottom var(--motion-fast) ease;
}
/* The FAQ script collapses an answer before removing [open]. */
.mastering-page details.is-collapsed .process-answer {
  grid-template-rows: 0fr;
}
.mastering-page details.is-collapsed .process-answer > p {
  padding-bottom: 0;
}
.mastering-page details.is-collapsed .process-question::after {
  content: "+";
}
.mastering-page #project-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.mastering-page .contact-layout {
  align-items: start;
}
.mastering-page .contact-field {
  align-content: start;
}
.mastering-page .contact-field small,
.mastering-page .contact-form small {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-soft);
}
/* The contact intro leads the section; the message spans the whole form. */
.mastering-page .mastering-contact-intro {
  gap: 14px;
  min-height: 0;
  margin-bottom: 48px;
}
.mastering-page .contact-copy h2 {
  font-size: clamp(2.9rem, 6vw, 5.4rem);
  line-height: 0.94;
}
/* A larger hit area for the email link without moving the layout. */
.mastering-page .contact-email {
  padding-block: 10px;
  margin-block: -10px;
}
.mastering-page .contact-form-wrap {
  grid-column: 1 / -1;
}
.mastering-page .contact-form textarea {
  min-height: 180px;
}
.mastering-page .mastering-form-notes {
  display: grid;
  gap: 4px;
  flex: 1 1 20rem;
  max-width: 36rem;
}
.mastering-page #enquiry-note,
.mastering-page .mastering-privacy-note {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-soft);
  text-wrap: pretty;
}
.mastering-privacy-note a {
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.mastering-page .button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}
.mastering-page .contact-combobox-option:disabled {
  color: var(--text-soft);
  opacity: 0.55;
  cursor: not-allowed;
}
.mastering-page .contact-combobox-trigger[aria-invalid="true"] {
  border-color: #b42318;
}
.mastering-page .contact-field.is-service-open {
  z-index: 25;
}
.mastering-page .contact-form-footer {
  flex-wrap: wrap;
}
.mastering-page .form-status:empty {
  display: none;
}
.mastering-page .form-status:not(:empty) {
  flex-basis: 100%;
}
.mastering-page .contact-form-footer .button {
  flex-shrink: 0;
  margin-left: auto;
}
.mastering-page input[type="date"] {
  height: 58px;
  appearance: none;
}
.mastering-page input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
  min-height: 1.5em;
}
.mastering-page .is-preview .mastering-date-field {
  grid-column: 1 / -1;
}
.mastering-nojs-navigation {
  position: relative;
  z-index: 41;
  display: flex;
  justify-content: center;
  gap: 24px;
  background: white;
  padding: 16px;
}
@media (max-width: 1120px) {
  .mastering-page .contact-copy h2 {
    max-width: 760px;
  }
}
@media (max-width: 720px) {
  .mastering-hero-intro {
    padding-top: 8px;
    gap: 22px;
  }
  .mastering-turnaround {
    padding: 7px 14px;
    font-size: 0.78rem;
  }
  .mastering-page .mastering-contact-intro {
    margin-bottom: 32px;
  }
  .mastering-page .contact-email {
    font-size: clamp(1.15rem, 5.4vw, 1.5rem);
  }
  .mastering-page .process-top {
    gap: 30px;
  }
}

.mastering-page .contact-field > .contact-combobox {
  margin-top: 10px;
}

/* Adjacent sections share about 120px of space (84px on phones), like Home. */
.mastering-content-section {
  background: var(--bg);
  padding-block: 60px;
  margin: 0;
}
.mastering-content-section > .section {
  padding-block: 0;
  content-visibility: visible;
  contain-intrinsic-size: none;
}
.mastering-content-section .section-heading h2 {
  color: var(--text);
}
.mastering-page .work-section {
  padding-top: 120px;
}
.mastering-page .work-section,
.mastering-page .about-section {
  padding-bottom: 60px;
}
.mastering-page .about-section,
.mastering-page .contact-section {
  padding-top: 60px;
}
/* The form continues the FAQ: about 72px between them (56px on phones). */
.mastering-page .contact-section {
  padding-top: 12px;
}
/* Selected mastering work responds immediately, independently of the Home timer. */
.mastering-page .featured-grid .card-play-glass {
  transition-duration: 150ms;
}
.mastering-page .featured-grid .card-link:focus-visible .card-play-glass,
.mastering-page .featured-grid .card-link.is-touch-active .card-play-glass {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
@media (hover: hover) and (pointer: fine) {
  .mastering-page .featured-grid .card-link .card-play-glass:hover {
    transform: scale(1.05);
  }
  .mastering-page .featured-grid .card-link:hover .card-play-glass {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
}
@media (max-width: 720px) {
  .mastering-content-section {
    padding-block: 42px;
  }
  .mastering-page .work-section {
    padding-top: 84px;
  }
  .mastering-page .work-section,
  .mastering-page .about-section {
    padding-bottom: 42px;
  }
  .mastering-page .about-section {
    padding-top: 42px;
  }
  .mastering-page .contact-section {
    padding-top: 14px;
  }
  .mastering-page .contact-combobox-value {
    white-space: normal;
    text-align: left;
  }
}

/* Keep the FAQ portrait compact without imposing a desktop height on phones. */
.mastering-page #faq .process-image-plain img {
  height: 640px;
  min-height: 0;
}
@media (max-width: 1120px) {
  .mastering-page #faq .process-image-plain img {
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 340px;
  }
}
@media (max-width: 720px) {
  .mastering-page .mastering-form-notes {
    flex: none;
  }
}

/* Landing-page updates stay scoped to mastering. */
.mastering-hero .hero-photo-layer::after {
  background: linear-gradient(90deg, transparent 0%, #000 100%);
}
.mastering-inline-link {
  color: var(--pink);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--motion-fast) ease;
}
.mastering-inline-link:hover,
.mastering-inline-link:focus-visible {
  color: var(--text);
}
.mastering-page .service-index {
  font-size: 21px;
}
.mastering-page .selected-works-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
/* Below 768px: two columns, with the lead project across both (no orphan card). */
@media (max-width: 767px) {
  .mastering-page .selected-works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mastering-page .selected-works-grid > .project-card-feature {
    grid-column: 1 / -1;
  }
  .mastering-page .selected-works-grid > .project-card-small .project-artist {
    overflow-wrap: anywhere;
  }
  .mastering-page
    .selected-works-grid
    > .project-card-small
    .card-play-glass {
    min-height: 44px;
    max-width: calc(100% - 8px);
    padding: 0 12px;
    border-width: 1px;
    font-size: 1rem;
  }
}
@media (max-width: 720px) {
  .mastering-hero-actions {
    flex-wrap: nowrap;
    gap: 10px;
    padding-inline: 16px;
  }
  .mastering-hero-actions .button {
    /* A shared percentage basis keeps the bordered preview CTA the same width. */
    flex: 1 1 50%;
    min-width: 0;
    max-width: 240px;
    padding-inline: 16px;
  }
}
/* Stack the CTAs where the longer label no longer fits side by side. */
@media (max-width: 480px) {
  .mastering-hero-actions {
    flex-direction: column;
  }
  .mastering-hero-actions .button {
    flex: none;
    width: 100%;
    max-width: 380px;
  }
}
/* Tablet: two-column form and comfortable line lengths in the about copy. */
@media (min-width: 721px) and (max-width: 1120px) {
  .mastering-page .contact-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1120px) {
  .mastering-page .about-copy {
    max-width: 42rem;
  }
}
/* Larger screens get larger hero CTAs to match the wordmark. */
@media (min-width: 1440px) {
  .mastering-hero-actions .button {
    min-width: 236px;
    min-height: 58px;
    font-size: 1.0625rem;
  }
}
/* Before/after player. #listen outranks the site's generic button styles. */
#listen .listen-player {
  --listen-played: var(--pink);
  --listen-idle: rgba(30, 30, 30, 0.16);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px;
  padding: 28px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
}
#listen .listen-player button {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  overflow: visible;
}
#listen .listen-player button::before,
#listen .listen-player button::after {
  content: none;
}
#listen .listen-player button:hover,
#listen .listen-player button:focus-visible {
  transform: none;
}
.listen-stage {
  display: grid;
  gap: 24px;
  align-content: start;
  min-width: 0;
}
.listen-now {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.listen-cover {
  flex: none;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(30, 30, 30, 0.12);
}
.listen-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.listen-role {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.listen-meta strong {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
}
.listen-meta span:last-child {
  color: var(--text-soft);
  font-size: 1.05rem;
}
#listen .listen-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 320px);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}
.listen-toggle-thumb {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc(50% - 5px);
  border-radius: 999px;
  background: var(--pink);
  transition: transform var(--motion-fast) ease;
}
.listen-toggle[data-version="after"] .listen-toggle-thumb {
  transform: translateX(100%);
}
#listen .listen-toggle button {
  position: relative;
  z-index: 1;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--text);
  transition: color var(--motion-fast) ease;
}
#listen .listen-toggle button[aria-pressed="true"] {
  color: white;
}
.listen-wave {
  height: 88px;
  border-radius: 12px;
  cursor: pointer;
  touch-action: none;
}
.listen-wave[aria-disabled="true"] {
  cursor: default;
}
.listen-wave canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.listen-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}
#listen .listen-player .listen-play {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--pink);
  color: white;
  transition:
    transform var(--motion-fast) ease,
    opacity var(--motion-fast) ease;
}
#listen .listen-player .listen-play:hover,
#listen .listen-player .listen-play:focus-visible {
  transform: scale(1.04);
}
#listen .listen-player .listen-play[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.listen-play svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}
.listen-icon-pause,
.listen-player.is-playing .listen-icon-play {
  display: none;
}
.listen-player.is-playing .listen-icon-pause {
  display: block;
}
.listen-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.listen-status {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}
.listen-status:empty {
  display: none;
}
.listen-tracks {
  display: grid;
  gap: 8px;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}
#listen .listen-player .listen-track {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  text-align: left;
  font-weight: 400;
  transition:
    border-color var(--motion-fast) ease,
    background-color var(--motion-fast) ease;
}
#listen .listen-player .listen-track:hover {
  background: rgba(211, 102, 172, 0.06);
}
#listen .listen-player .listen-track[aria-pressed="true"] {
  border-color: rgba(211, 102, 172, 0.58);
  background: rgba(211, 102, 172, 0.08);
}
.listen-track img {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
}
.listen-track-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.listen-track-copy strong {
  font-weight: 800;
}
.listen-track-copy span {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 899px) {
  #listen .listen-player {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  #listen .listen-player {
    gap: 24px;
    padding: 18px;
    border-radius: var(--radius-lg);
  }
  .listen-cover {
    width: 88px;
    height: 88px;
    border-radius: var(--radius-md);
  }
  .listen-wave {
    height: 72px;
  }
  #listen .listen-toggle {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mastering-turnaround::after {
    animation: none;
    display: none;
  }
  .mastering-page .process-answer > p,
  .mastering-inline-link,
  .mastering-preview,
  .listen-toggle-thumb,
  #listen .listen-player .listen-play,
  #listen .listen-player .listen-track {
    transition: none;
  }
  #listen .listen-player .listen-play:hover,
  #listen .listen-player .listen-play:focus-visible {
    transform: none;
  }
}
