/* ============================================================
   LOOPIN — /mastering  (in-browser mastering tool)
   ============================================================ */
.masterpage { background: var(--bg); }

/* nav: "Loopin mastering" lockup + link out to the app */
.brand--tool { gap: 9px; }
.brand__tool {
  font-size: 1.06rem; font-weight: 400; letter-spacing: -0.01em;
  color: var(--ink-faint); padding-left: 10px; position: relative;
}
.brand__tool::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 1em; background: var(--line-2);
}
.nav__right { display: flex; align-items: center; gap: 22px; }
.nav__link { font-size: .95rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 5px; transition: color .2s var(--ease); }
.nav__link:hover { color: var(--ink); }
.nav__link--current { color: var(--ink); }
.nav__link--ext svg { width: 14px; height: 14px; opacity: .8; }
.nav__link--ext:hover svg { opacity: 1; }

.mp { padding-bottom: 40px; }

/* ── hero ── */
.mp-hero { padding: 60px 0 34px; text-align: center; }
.mp-eyebrow { display: inline-block; font-size: .78rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 20px; }
.mp-hero__title { font-size: clamp(2.2rem, 5.5vw, 3.8rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1.03; }
.mp-hero__sub { color: var(--ink-soft); font-size: 1.1rem; max-width: 560px; margin: 22px auto 0; line-height: 1.5; }

/* ── the tool shell ── */
.masterer {
  position: relative; margin-top: 16px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg-2); overflow: hidden;
}
.masterer__status { text-align: center; color: var(--ink-faint); font-size: .9rem; padding: 0 20px 4px; min-height: 1.2em; }
.masterer.is-busy .masterer__status { color: var(--ink-soft); }

/* ── dropzone ── */
.drop { cursor: pointer; }
.drop__inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 320px; padding: 50px 24px;
  border: 2px dashed var(--line-2); border-radius: var(--radius-lg); margin: 14px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.drop.is-drag .drop__inner, .drop:hover .drop__inner { border-color: var(--ink-soft); background: rgba(255,255,255,.02); }
.drop__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); margin-bottom: 22px; }
.drop__icon svg { width: 26px; height: 26px; }
.drop__title { font-size: 1.45rem; font-weight: 500; letter-spacing: -0.02em; }
.drop__sub { color: var(--ink-soft); margin-top: 10px; font-size: 1rem; }
.drop__browse { font: inherit; color: var(--ink); background: none; border: none; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.drop__note { color: var(--ink-faint); font-size: .82rem; margin-top: 22px; }

/* ── workspace ── */
.ws { padding: 26px 26px 30px; }
.ws__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ws__file { display: flex; flex-direction: column; min-width: 0; }
.ws__name { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.ws__meta { font-size: .85rem; color: var(--ink-faint); margin-top: 2px; }
.ws__change { font-size: .9rem; color: var(--ink-soft); background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 16px; cursor: pointer; transition: color .2s, border-color .2s; }
.ws__change:hover { color: var(--ink); border-color: var(--ink-soft); }

.ws__wave { width: 100%; height: 96px; display: block; margin: 22px 0; border-radius: 12px; background: var(--surface); }

/* ── player bar ── */
.player { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.player__play { width: 54px; height: 54px; border-radius: 50%; flex: none; display: grid; place-items: center; cursor: pointer; background: var(--ink); color: #0A0A0B; border: none; transition: transform .2s var(--ease), background .2s; }
.player__play:hover { transform: scale(1.05); background: #fff; }
.player__play svg { width: 22px; height: 22px; }
.player__play .ic-play { margin-left: 2px; }
.player__play .ic-pause { display: none; }
.masterer.is-playing .player__play .ic-play { display: none; }
.masterer.is-playing .player__play .ic-pause { display: block; }

.ab { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.ab__btn { font: inherit; font-size: .92rem; font-weight: 500; color: var(--ink-soft); background: none; border: none; border-radius: 999px; padding: 8px 18px; cursor: pointer; transition: color .2s, background .2s; }
.ab__btn.is-on { background: var(--ink); color: #0A0A0B; }

.player__dl { margin-left: auto; cursor: pointer; }
.player__dl small { display: block; font-size: .62rem; font-weight: 400; opacity: .7; }
.player__dl strong { font-size: 1.02rem; font-weight: 600; }
.player__dl.is-disabled { opacity: .5; pointer-events: none; }

/* ── presets ── */
.ws__h2 { font-size: 1.05rem; font-weight: 500; color: var(--ink-soft); letter-spacing: -0.01em; margin: 34px 0 16px; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.preset {
  position: relative;
  text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.preset:hover { border-color: var(--line-2); transform: translateY(-2px); }
.preset.is-on { border-color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ink); }
.preset__icon { color: var(--ink-soft); margin-bottom: 2px; transition: color .2s var(--ease); }
.preset__icon svg { width: 22px; height: 22px; display: block; }
.preset:hover .preset__icon, .preset.is-on .preset__icon { color: var(--ink); }
.preset__tags { font-size: .72rem; letter-spacing: .03em; color: var(--ink-faint); }
.preset__name { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.02em; margin-top: 2px; }
.preset__desc { font-size: .9rem; color: var(--ink-soft); line-height: 1.4; }

/* ── spinners & loading states ── */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
.spinner--lg { width: 46px; height: 46px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* first-upload loader panel */
.ws-load { min-height: 320px; margin: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; }
.ws-load[hidden] { display: none; }
.ws-load__title { font-size: 1.2rem; font-weight: 500; letter-spacing: -0.02em; margin-top: 26px; }
.ws-load__sub { color: var(--ink-soft); font-size: .95rem; }

/* per-feel loading: spinner on the picked card, the chain dims, meters pulse */
.preset.is-loading::after {
  content: ''; position: absolute; top: 14px; right: 14px; width: 16px; height: 16px;
  border: 2px solid var(--line-2); border-top-color: var(--ink); border-radius: 50%;
  animation: spin .8s linear infinite;
}
.preset.is-loading { border-color: var(--ink-soft); }
.masterer.is-loading .presets { opacity: .7; }
.masterer.is-loading .meter__to { animation: meterPulse 1s ease-in-out infinite; }
@keyframes meterPulse { 0%, 100% { opacity: .3; } 50% { opacity: .7; } }
@media (prefers-reduced-motion: reduce) {
  .spinner, .preset.is-loading::after { animation-duration: 1.6s; }
  .masterer.is-loading .meter__to { animation: none; opacity: .5; }
}

/* ── mono-check toggle ── */
.player__mono { font: inherit; font-size: .9rem; color: var(--ink-soft); background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.player__mono:hover { color: var(--ink); border-color: var(--ink-soft); }
.player__mono.is-on { background: var(--ink); color: #0A0A0B; border-color: var(--ink); }

/* ── before / after meters ── */
.meters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0 4px; }
.meter { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; }
.meter__label { font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); }
.meter__vals { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.meter__from { font-size: 1.05rem; color: var(--ink-soft); }
.meter__arr { font-size: .9rem; color: var(--ink-faint); }
.meter__to { font-size: 1.35rem; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }
.meter__unit { font-size: .72rem; color: var(--ink-faint); }

/* ── styles preview (marketing showcase) ── */
.feels-sec { padding: 70px 0 10px; }
.feels-sec__title { font-size: clamp(1.7rem, 3.8vw, 2.5rem); font-weight: 500; letter-spacing: -0.035em; text-align: center; }
.feels-sec__sub { color: var(--ink-soft); text-align: center; max-width: 600px; margin: 14px auto 36px; line-height: 1.5; }
.feels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feel {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 4px;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.feel:hover { transform: translateY(-3px); border-color: var(--line-2); }
.feel__icon { color: var(--ink-soft); margin-bottom: 12px; transition: color .25s var(--ease), transform .25s var(--ease); }
.feel__icon svg { width: 26px; height: 26px; display: block; }
.feel:hover .feel__icon { color: var(--ink); transform: translateY(-2px) scale(1.06); }
.feel__name { font-size: 1.18rem; font-weight: 500; letter-spacing: -0.02em; }
.feel__desc { font-size: .86rem; color: var(--ink-soft); }

/* ── what is mastering ── */
.mp-about { padding: 90px 0 30px; }
.mp-about__inner { max-width: 720px; margin: 0 auto; }
.mp-about__title { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 500; letter-spacing: -0.03em; margin-bottom: 22px; }
.mp-about h3 { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); margin-top: 34px; margin-bottom: 10px; }
.mp-about p { color: var(--ink-soft); line-height: 1.7; margin-bottom: 18px; font-size: 1.05rem; }
.mp-about strong { color: var(--ink); font-weight: 500; }
.mp-about a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); transition: text-decoration-color .2s; }
.mp-about a:hover { text-decoration-color: var(--ink); }

/* ── download success modal ── */
.mq { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.mq[hidden] { display: none; }
.mq__scrim { position: absolute; inset: 0; background: rgba(5,5,6,.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s var(--ease); }
.mq__card {
  position: relative; z-index: 1; width: 100%; max-width: 460px; text-align: center;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 44px 36px 36px; box-shadow: 0 40px 120px rgba(0,0,0,.6);
  transform: translateY(14px) scale(.98); opacity: 0; transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.mq.is-in .mq__scrim { opacity: 1; }
.mq.is-in .mq__card { transform: none; opacity: 1; }
.mq__close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; display: grid; place-items: center; border: none; background: none; color: var(--ink-soft); cursor: pointer; border-radius: 50%; transition: color .2s, background .2s; }
.mq__close:hover { color: var(--ink); background: var(--surface); }
.mq__close svg { width: 18px; height: 18px; }
.mq__mark { display: inline-grid; place-items: center; width: 56px; height: 56px; color: var(--ink); margin-bottom: 18px; }
.mq__mark svg { width: 40px; height: 40px; }
.mq__eyebrow { font-size: .8rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.mq__title { font-size: clamp(1.7rem, 4vw, 2.2rem); font-weight: 500; letter-spacing: -0.03em; margin: 8px 0 14px; }
.mq__sub { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.55; max-width: 360px; margin: 0 auto 26px; }
.mq__actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mq__actions .btn--store { width: 100%; max-width: 280px; justify-content: center; }
.mq__ghost { font: inherit; font-size: .98rem; color: var(--ink-soft); background: none; border: none; cursor: pointer; padding: 4px 8px; transition: color .2s; }
.mq__ghost:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .mq__scrim, .mq__card { transition: none; } }

/* faq cta */
.faqs__cta { text-align: center; margin-top: 30px; color: var(--ink-soft); font-size: .95rem; }
.faqs__cta a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ── responsive ── */
@media (max-width: 760px) {
  .presets { grid-template-columns: 1fr 1fr; }
  .meters { grid-template-columns: repeat(2, 1fr); }
  .feels { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .presets { grid-template-columns: 1fr; }
  .meters { grid-template-columns: 1fr 1fr; }
  .feels { grid-template-columns: 1fr 1fr; gap: 10px; }
  .player__dl { margin-left: 0; width: 100%; justify-content: center; }
  .player { gap: 12px; }
  .nav__right { gap: 14px; }
}
