/* =========================================================
   AMYJANE × Pavel — NFC landing page
   Mobile-first single-page audio landing.
   ========================================================= */

:root {
  /* Brand palette — matches Pavel poster reference */
  --pink:        #f4a8c5;
  --pink-soft:   #fbd4e2;
  --pink-deep:   #ec78a4;
  --pink-edge:   #e94f88;

  --mint:        #b9d8b6;
  --mint-soft:   #d5e9c9;
  --mint-deep:   #7fb18a;
  --mint-dark:   #3f6b4d;

  --cream:       #f5efe1;
  --cream-soft:  #faf6ec;
  --ivory:       #fffdf8;

  --ink:         #2b332d;
  --ink-soft:    #5a6259;
  --ink-mute:    #8c948c;
  --hairline:    rgba(43,51,45,0.10);

  /* Layout */
  --shell-max:   430px;
  --pad-x:       22px;
  --radius-card: 28px;
  --radius-md:   18px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-bouncy: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--pink) 0%, var(--pink-deep) 100%);
  min-height: 100svh;
  min-height: 100vh;
  overflow-x: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 18px var(--pad-x) 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* =========================================================
   Poster card
   ========================================================= */
.poster {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--pink);
  line-height: 0;
  box-shadow:
    0 22px 60px -28px rgba(218, 71, 121, 0.55),
    0 4px 18px -8px rgba(218, 71, 121, 0.35);
}
.poster__art {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 360px) {
  .stage             { padding: 14px 14px 28px; }
  .player            { padding: 16px 18px 20px; }
  .player__heading   { font-size: 23px; }
}

/* =========================================================
   Player card
   ========================================================= */
.player {
  background: linear-gradient(180deg, var(--cream-soft) 0%, var(--cream) 100%);
  border-radius: var(--radius-card);
  padding: 18px 22px 22px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.85),
    0 18px 50px -28px rgba(0,0,0,0.35);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.player__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
}
.player__brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.player__brand strong {
  font-weight: 600;
  text-indent: 0.4em;
}
.iconbtn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  transition: background .15s ease, color .15s ease;
}
.iconbtn:hover,
.iconbtn:focus-visible { background: rgba(0,0,0,0.05); }

.player__title { text-align: left; padding: 0 2px; }
.player__heading {
  margin: 0;
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.player__artist {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--mint-deep);
}

/* ---------- Big play button (the green orb) ---------- */
.bigplay {
  position: relative;
  align-self: center;
  width: min(58vw, 240px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(110% 110% at 30% 25%, #ffffff 0%, var(--mint-soft) 30%, var(--mint) 70%, var(--mint-deep) 100%);
  display: grid;
  place-items: center;
  margin: 4px auto 6px;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.75),
    inset 0 -10px 28px rgba(63, 107, 77, 0.18),
    0 22px 40px -16px rgba(63, 107, 77, 0.55),
    0 8px 16px -10px rgba(63, 107, 77, 0.4);
  transition: transform .18s var(--ease-out), box-shadow .18s ease;
}
.bigplay:active { transform: scale(0.97); }
.bigplay:focus-visible {
  outline: 3px solid rgba(63,107,77,0.4);
  outline-offset: 4px;
}

/* progress ring around the orb */
.bigplay__progress {
  position: absolute;
  inset: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  transform: rotate(-90deg);
}
.bigplay__progress-track,
.bigplay__progress-fill {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
}
.bigplay__progress-track { stroke: rgba(255,255,255,0.55); }
.bigplay__progress-fill {
  stroke: var(--mint-dark);
  stroke-dasharray: 628.32; /* 2 * PI * 100 */
  stroke-dashoffset: 628.32;
  transition: stroke-dashoffset .25s linear;
  filter: drop-shadow(0 2px 4px rgba(63,107,77,0.3));
}

.bigplay__core {
  position: relative;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--mint-dark);
}
.bigplay__icon {
  position: absolute;
  width: 38%;
  height: 38%;
  fill: currentColor;
  transition: opacity .18s ease, transform .18s ease;
}
.bigplay__icon--pause,
.bigplay__icon--loading { opacity: 0; transform: scale(0.85); }
.bigplay[data-state="playing"] .bigplay__icon--play    { opacity: 0; transform: scale(0.85); }
.bigplay[data-state="playing"] .bigplay__icon--pause   { opacity: 1; transform: scale(1); }
.bigplay[data-state="loading"] .bigplay__icon--play    { opacity: 0; }
.bigplay[data-state="loading"] .bigplay__icon--pause   { opacity: 0; }
.bigplay[data-state="loading"] .bigplay__icon--loading { opacity: 1; transform: scale(1); animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) scale(1); } }

/* gentle breathing while playing */
.bigplay[data-state="playing"]::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
  animation: breathe 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes breathe {
  0%, 100% { transform: scale(1);    opacity: 0.6; }
  50%      { transform: scale(1.04); opacity: 0;   }
}

/* ---------- Add to playlist pill ---------- */
.addlist {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(127, 177, 138, 0.12);
  color: var(--mint-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background .15s ease, transform .15s var(--ease-bouncy);
}
.addlist:hover { background: rgba(127, 177, 138, 0.2); }
.addlist[aria-pressed="true"] {
  background: var(--mint-deep);
  color: #fff;
}
.addlist[aria-pressed="true"] .addlist__plus  { display: none; }
.addlist[aria-pressed="true"] .addlist__check { display: block !important; }

/* ---------- Error / hint bar ---------- */
.errbar {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(236, 120, 164, 0.14);
  color: var(--pink-edge);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  max-width: 100%;
  text-align: center;
  animation: errslide .25s var(--ease-out);
}
.errbar[hidden] { display: none !important; }
.errbar svg { flex-shrink: 0; }
@keyframes errslide {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Seek bar ---------- */
.seek {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}
.seek__bar {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.seek__bar-bg,
.seek__bar-fill {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  border-radius: 999px;
}
.seek__bar-bg   { background: rgba(0,0,0,0.10); }
.seek__bar-fill { background: var(--mint-deep); width: 0; right: auto; }
.seek__bar-knob {
  position: absolute;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--mint-deep);
  transform: translateX(-50%);
  box-shadow: 0 2px 6px rgba(63,107,77,0.3);
  transition: transform .12s ease;
}
.seek__bar:hover .seek__bar-knob,
.seek__bar:focus-visible .seek__bar-knob { transform: translateX(-50%) scale(1.2); }

/* ---------- Main transport controls ---------- */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 4px 0;
}
.ctrl {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: background .15s ease, transform .15s var(--ease-bouncy);
}
.ctrl:hover { background: rgba(0,0,0,0.05); }
.ctrl:active { transform: scale(0.92); }
.ctrl--main {
  width: 54px;
  height: 54px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(43,51,45,0.55);
}
.ctrl--main:hover { background: #1f2620; }
.ctrl__pause { display: none; }
.ctrl--main[data-state="playing"] .ctrl__play  { display: none; }
.ctrl--main[data-state="playing"] .ctrl__pause { display: block; }

/* ---------- Bottom bar: like / comment / volume ---------- */
.bottom {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 4px;
  border-top: 1px solid var(--hairline);
  margin-top: 4px;
  padding-top: 14px;
}
.bottom__like,
.bottom__comment {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  transition: color .15s ease, background .15s ease, transform .15s var(--ease-bouncy);
}
.bottom__like:hover,
.bottom__comment:hover { background: rgba(0,0,0,0.05); }
.bottom__like[aria-pressed="true"] {
  color: var(--pink-edge);
}
.bottom__like[aria-pressed="true"] svg {
  fill: var(--pink-edge);
  animation: pop 0.4s var(--ease-bouncy);
}
@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.bottom__vol {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 130px;
}
.iconbtn--vol { width: 32px; height: 32px; }
.vol__bar {
  position: relative;
  flex: 1;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.vol__bar-bg,
.vol__bar-fill {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  border-radius: 999px;
}
.vol__bar-bg   { background: rgba(0,0,0,0.10); }
.vol__bar-fill { background: var(--ink-soft); width: 100%; right: auto; }

/* =========================================================
   Footer
   ========================================================= */
.legal {
  text-align: center;
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  line-height: 1.6;
}
.legal p { margin: 2px 0; }
.legal__sub {
  font-style: italic;
  color: rgba(255,255,255,0.7);
  font-size: 10.5px;
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
