/* ============================================================
   DOOOQQQQ — Afonso Quintela portfolio
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;700;800;900&display=swap');

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #8a8a8a;
  --line: #1e1e1e;
  --card: #0d0d0d;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1400px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px clamp(20px, 5vw, 56px);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  font-weight: 900;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* Header logo image (black line-art inverted to white on the dark header) */
.brand__logo {
  height: clamp(34px, 4.4vw, 48px);
  width: auto;
  display: block;
  filter: invert(1);
}
.brand__text { display: none; }
/* Shown only if the logo image is missing */
.brand.is-fallback .brand__logo { display: none; }
.brand.is-fallback .brand__text { display: inline; }

.header__right {
  grid-column: 3;
  justify-self: end;
}

.btn-contact {
  color: var(--fg) !important;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(15px, 1.5vw, 20px);
  letter-spacing: 0.08em;
  transition: opacity 0.25s var(--ease);
}
.btn-contact:hover { opacity: 0.6; }

/* ---------------- Main ---------------- */
main { flex: 1 0 auto; width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }

/* ---------------- Hero ---------------- */
.hero {
  /* top/bottom only — the section also carries .wrap, which already
     supplies the left/right padding; a shorthand here would zero it out */
  padding-top: clamp(60px, 12vh, 150px);
  padding-bottom: clamp(40px, 7vh, 90px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
/* Two columns once there's room: text left, image right */
@media (min-width: 820px) {
  .hero { grid-template-columns: 1.05fr 0.95fr; }
}
/* Stacked (mobile): image on top of the bio so there's a clear separation. */
@media (max-width: 819px) {
  .hero__media { order: -1; }
}
.hero__text { min-width: 0; }
.hero__title {
  font-weight: 900;
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero__bio {
  max-width: 640px;
  font-weight: 600;
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.5;
  color: #cfcfcf;
  letter-spacing: 0.005em;
}
.hero__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 6px;
  background: var(--card);
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------------- Category list (home) — vertical ---------------- */
.cats {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.4vw, 20px);
  padding-bottom: clamp(50px, 8vh, 100px);
}
.cat {
  position: relative;
  display: block;
  height: clamp(240px, 42vh, 460px);
  overflow: hidden;
  border-radius: 4px;
  background: var(--card);
}
.cat img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
  filter: brightness(0.62);
}
.cat::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.55));
  transition: background 0.4s var(--ease);
}
.cat__label {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(18px, 1.9vw, 30px);
  line-height: 1.05;
}
.cat:hover img { transform: scale(1.08); filter: brightness(0.78); }
.cat:hover::after { background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.4)); }

/* ---------------- Category page header ---------------- */
.page-head {
  /* top/bottom only — see .hero above for why this can't be a shorthand */
  padding-top: clamp(46px, 9vh, 110px);
  padding-bottom: clamp(24px, 4vh, 48px);
}
.page-head h1 {
  font-weight: 900;
  font-size: clamp(44px, 9vw, 120px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.page-head p {
  margin-top: 16px;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------------- Content grids ---------------- */
.grid {
  display: grid;
  gap: clamp(10px, 1.4vw, 22px);
  padding-bottom: clamp(60px, 10vh, 120px);
}
.grid--wide   { grid-template-columns: 1fr; }

.item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--card);
  cursor: pointer;
}
.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease), filter 0.4s var(--ease);
}
.item--video { height: clamp(300px, 72vh, 700px); }
/* On phones, keep video tiles landscape instead of stretching tall with
   the 72vh clamp above (which made portrait screens crop them oddly). */
@media (max-width: 720px) {
  .item--video { height: auto; aspect-ratio: 16 / 9; }
}

/* Stills — same bordered-card grid at every screen size (mobile and
   desktop both scroll the same pattern; only the column count grows
   with available width). */
.grid--stills {
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(10px, 2vw, 18px);
}
@media (min-width: 700px) {
  .grid--stills { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1150px) {
  .grid--stills { grid-template-columns: repeat(4, 1fr); }
}
.item--photo {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
}
.item:hover img { transform: scale(1.04); }

/* Masonry ("tetris") layout — mixed formats packing together. Tiles keep
   their natural proportions and flow down balanced columns. */
.grid--masonry {
  column-count: 3;
  column-gap: clamp(10px, 1.4vw, 22px);
  padding-bottom: clamp(60px, 10vh, 120px);
}
/* Keep it a 2-column grid on tablet and phone (same disposition as desktop,
   never a single big column). */
@media (max-width: 900px) { .grid--masonry { column-count: 2; } }
.grid--masonry .item {
  width: 100%;
  margin: 0 0 clamp(10px, 1.4vw, 22px);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}
.item--tile {
  border: 1px solid var(--line);
  background: var(--card);
}
.item--tile img {
  width: 100%;
  height: auto;      /* keep the file's natural proportions */
  display: block;
  object-fit: contain;
}
/* Video tiles inside a tetris grid: crop the thumbnail to a clean shape (so
   a poster with letterboxing/black bars from a non-16:9 source shows just
   the frame, not the padding) instead of showing the poster's raw natural
   size. Defaults to 16:9; set style="--poster-ratio: 4 / 5" (or whatever
   fits) on an .item--video whose source is a different shape, e.g. a
   vertical/portrait video whose auto-generated thumbnail is pillarboxed.
   The lightbox itself is untouched either way — opening the tile always
   plays the full, uncropped video, bars and all, in its normal shape. */
.grid--masonry .item--video { height: auto; }
.grid--masonry .item--video img {
  aspect-ratio: var(--poster-ratio, 16 / 9);
  height: auto;
  object-fit: cover;
}
/* Video tiles carry permanent overlay text (title/role), unlike Design's or
   Stills' tiles — so keep a single full-width column on phones, where a
   narrower column would wrap that text past the tile's height and clip it. */
@media (max-width: 700px) {
  .grid--masonry--video { column-count: 1; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Overlay text on film / creative / design items */
.item__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(16px, 2vw, 30px);
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.7));
  transition: opacity 0.4s var(--ease);
}
.item__title {
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(20px, 2.4vw, 40px);
  line-height: 1;
  letter-spacing: 0.01em;
}
.item__role {
  margin-top: 8px;
  font-weight: 600;
  font-size: clamp(12px, 1.1vw, 16px);
  letter-spacing: 0.06em;
  color: #d8d8d8;
}
.item__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 66px; height: 66px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.85);
  display: grid; place-items: center;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.item__play::before {
  content: '';
  border-left: 18px solid #fff;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  margin-left: 4px;
}
.item:hover .item__play { transform: translate(-50%, -50%) scale(1.08); background: rgba(0,0,0,0.35); }

/* ---------------- Lightbox ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 70px);
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.lightbox.open { display: flex; opacity: 1; }
body.lb-open { overflow: hidden; }
/* Blur + darken the rest of the site while lightbox is open */
body.lb-open .site-header,
body.lb-open main,
body.lb-open .site-footer {
  filter: blur(6px) brightness(0.4);
  transition: filter 0.35s var(--ease);
  pointer-events: none;
}

.lightbox__media {
  position: relative;
  max-width: min(1200px, 92vw);
  max-height: 86vh;
  transform: scale(0.96);
  transition: transform 0.35s var(--ease);
}
.lightbox.open .lightbox__media { transform: scale(1); }
.lightbox__media img,
.lightbox__media video {
  max-width: 100%;
  max-height: 86vh;
  display: block;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

/* Photo details (camera/lens/exposure) shown over the enlarged still —
   thin white caption text tucked into the bottom corners. Populated
   from the data-* attributes on the .item in stills.html, so adding
   the info for a new photo is just filling in those attributes. */
.lightbox__meta {
  position: absolute;
  bottom: clamp(10px, 2.5vw, 22px);
  max-width: 46%;
  font-weight: 400;
  font-size: clamp(10px, 1.1vw, 12px);
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}
.lightbox__meta--left { left: clamp(10px, 2.5vw, 22px); text-align: left; }
.lightbox__meta--right { right: clamp(10px, 2.5vw, 22px); text-align: right; }
.lightbox__close {
  position: absolute;
  top: clamp(16px, 3vw, 34px);
  right: clamp(16px, 3vw, 34px);
  width: 52px; height: 52px;
  border: 1.5px solid rgba(255,255,255,0.6);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.lightbox__close:hover { background: #fff; color: #000; border-color: #fff; }

/* Carousel (gallery) inside the lightbox */
.lightbox__media--pad {
  padding: clamp(20px, 4vw, 48px);
  border-radius: 10px;
  transition: background 0.4s var(--ease), transform 0.35s var(--ease);
}
.lightbox__media--pad img { border-radius: 0; box-shadow: none; }
.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: clamp(42px, 5vw, 56px);
  height: clamp(42px, 5vw, 56px);
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}
.lightbox__arrow:hover { background: #fff; color: #000; }
.lightbox__arrow--prev { left: clamp(-6px, -3vw, -24px); }
.lightbox__arrow--next { right: clamp(-6px, -3vw, -24px); }
/* Stills specifically: no arrows or slide counter, swipe (touch) or the
   arrow keys (keyboard/mouse) is all there is — see openGroupGallery in
   site.js, which adds this modifier class. Every other gallery (Design,
   Creative Direction, …) keeps its arrows and counter as before. */
.lightbox__media--stills .lightbox__arrow,
.lightbox__media--stills .lightbox__count { display: none; }
.lightbox__count {
  position: absolute;
  top: clamp(8px, 2vw, 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 12px;
  border-radius: 999px;
  pointer-events: none;
}
/* Embedded video (YouTube / Vimeo) inside the lightbox */
.lightbox__embed {
  position: relative;
  width: min(1200px, 92vw);
  aspect-ratio: 16 / 9;
  max-height: 86vh;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.lightbox__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* One-line title shown at the bottom of the opened work */
.lightbox__caption {
  position: absolute;
  left: 50%;
  bottom: clamp(10px, 2.5vw, 20px);
  transform: translateX(-50%);
  z-index: 3;
  max-width: 92%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(13px, 1.6vw, 18px);
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 7px 18px;
  border-radius: 999px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
@media (max-width: 560px) {
  .lightbox__arrow--prev { left: 4px; }
  .lightbox__arrow--next { right: 4px; }
}

/* ---------------- Footer ---------------- */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: clamp(34px, 6vh, 64px) clamp(20px, 5vw, 56px);
}
.footer__socials {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.social {
  width: 66px; height: 56px;
  border-radius: 10px;
  background: #141414;
  display: grid; place-items: center;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.social:hover { background: #222; transform: translateY(-2px); }
.social svg { width: 26px; height: 26px; fill: #fff; }
.footer__copy {
  text-align: center;
  margin-top: 26px;
  color: #555;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ============================================================
   Contact — 3-step questionnaire
   ============================================================ */
.contact {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 8vh, 90px) clamp(20px, 5vw, 40px) clamp(60px, 10vh, 120px);
}

/* Step indicator */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: clamp(26px, 5vh, 48px);
  text-transform: uppercase;
  font-weight: 800;
  font-size: clamp(15px, 1.6vw, 20px);
  letter-spacing: 0.08em;
}
.steps__item { color: #4a4a4a; transition: color 0.3s var(--ease); }
.steps__item.active { color: var(--fg); }
.steps__sep { color: #333; }

/* Step titles */
.step__title {
  text-align: center;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(28px, 5vw, 52px);
  letter-spacing: 0.01em;
  line-height: 1;
  margin-bottom: clamp(28px, 5vh, 46px);
}

.step { display: none; }
.step.active { display: block; animation: fade 0.4s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Calendar */
.cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.cal__month {
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: 0.04em;
}
.cal__nav {
  background: none;
  border: none;
  color: var(--fg);
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
  padding: 0 8px;
  transition: opacity 0.2s var(--ease);
}
.cal__nav:hover { opacity: 0.55; }
.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.cal__dow {
  color: #666;
  font-weight: 800;
  font-size: clamp(13px, 1.4vw, 17px);
  padding: 10px 0;
  text-transform: uppercase;
}
.cal__day {
  padding: clamp(12px, 2vw, 18px) 0;
  font-weight: 800;
  font-size: clamp(16px, 1.8vw, 22px);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.cal__day:hover { background: #1a1a1a; }
.cal__day.is-empty { cursor: default; }
.cal__day.is-past {
  color: #3a3a3a;
  text-decoration: line-through;
  cursor: not-allowed;
}
.cal__day.is-past:hover { background: none; }
.cal__day.selected { background: var(--fg); color: var(--bg); }

/* Service options */
.services { display: flex; flex-direction: column; gap: 16px; }
.service-opt {
  background: #0d0d0d;
  border: 1px solid #262626;
  color: var(--fg);
  padding: clamp(20px, 3vw, 30px);
  font-family: inherit;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(20px, 2.6vw, 32px);
  letter-spacing: 0.03em;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.2s var(--ease);
}
.service-opt:hover { background: #161616; transform: translateY(-2px); }
.service-opt.selected { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Details form */
.form { display: flex; flex-direction: column; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field {
  background: #0d0d0d;
  border: 1px solid #262626;
  color: var(--fg);
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(16px, 1.7vw, 20px);
  padding: 18px 20px;
  border-radius: 4px;
  width: 100%;
  transition: border-color 0.25s var(--ease);
}
.field::placeholder { color: #6a6a6a; }
.field:focus { outline: none; border-color: #666; }
textarea.field { resize: vertical; min-height: 140px; }
select.field { appearance: none; cursor: pointer; }

/* Nav buttons */
.step__nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: clamp(28px, 5vh, 44px);
}
.btn {
  font-family: inherit;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(16px, 1.8vw, 22px);
  padding: 18px 34px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #333;
  background: transparent;
  color: var(--fg);
  transition: opacity 0.2s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn--ghost:hover { background: #161616; }
.btn--primary { background: var(--fg); color: var(--bg); border-color: var(--fg); flex: 1; }
.btn--primary:hover { opacity: 0.85; }
.btn[disabled] { opacity: 0.3; cursor: not-allowed; }
.btn--submit { width: 100%; }

.thanks {
  text-align: center;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(24px, 4vw, 44px);
  padding: clamp(50px, 10vh, 120px) 0;
  line-height: 1.1;
}
.thanks small {
  display: block;
  margin-top: 18px;
  font-weight: 600;
  text-transform: none;
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .grid--wide { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form__row { grid-template-columns: 1fr; }
}

/* ---------------- Floating music player (horizontal bar) ---------------- */
.audio-player {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 60;
  font-family: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gp-bg: rgba(58, 56, 60, 0.55);
  --gp-text: #ffffff;
  --gp-muted: rgba(255, 255, 255, 0.62);
}

/* Only one icon of each pair is ever visible */
.audio-player .icon-pause,
.audio-player .icon-vol-off { display: none; }
.audio-player.is-playing .icon-play { display: none; }
.audio-player.is-playing .icon-pause { display: block; }
.audio-player.is-muted .icon-vol-on { display: none; }
.audio-player.is-muted .icon-vol-off { display: block; }

/* Collapsed round icon */
.audio-player__toggle {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: var(--gp-bg);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  color: var(--gp-text);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.audio-player__toggle:hover { transform: scale(1.06); }
.audio-player.is-open .audio-player__toggle { opacity: 0; pointer-events: none; }
.audio-player__toggle-art {
  position: relative;
  width: 30px; height: 30px;
  border-radius: 7px;
  overflow: hidden;
  display: grid;
  grid-template-areas: "stack";
  place-items: center;
}
.audio-player__toggle-img,
.audio-player__toggle .icon-note { grid-area: stack; }
.audio-player__toggle-img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}
.audio-player__toggle .icon-note { width: 18px; height: 18px; fill: var(--gp-text); }
.audio-player.is-playing .audio-player__toggle-art { opacity: 0.35; }
.audio-player__bars {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center; gap: 3px;
}
.audio-player.is-playing .audio-player__bars { display: flex; }
.audio-player__bars i {
  width: 3px; border-radius: 2px; background: var(--gp-text);
  animation: eq 0.9s ease-in-out infinite;
}
.audio-player__bars i:nth-child(1) { height: 7px;  animation-delay: -0.6s; }
.audio-player__bars i:nth-child(2) { height: 14px; animation-delay: -0.3s; }
.audio-player__bars i:nth-child(3) { height: 9px;  animation-delay: 0s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .audio-player__bars i { animation: none; } }

/* Expanded horizontal bar */
.audio-player__bar {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
  max-width: min(560px, calc(100vw - 32px));
  padding: 10px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: var(--gp-bg);
  backdrop-filter: blur(26px) saturate(1.4);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  color: var(--gp-text);
  transform-origin: top left;
  transform: scale(0.94);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.24s var(--ease), opacity 0.24s var(--ease);
}
.audio-player.is-open .audio-player__bar { transform: scale(1); opacity: 1; pointer-events: auto; }

.audio-player__row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.audio-player__art {
  width: 52px; height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex: none;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-areas: "stack";
  place-items: center;
}
/* Image and note occupy the same cell; the image, when present, sits on top
   and fully covers the box so the note can never peek through. */
.audio-player__art-img,
.audio-player__art-fallback { grid-area: stack; }
.audio-player__art-img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}
.audio-player__art-fallback { width: 20px; height: 20px; fill: rgba(255, 255, 255, 0.7); }

.audio-player__meta {
  min-width: 96px;
  max-width: 190px;
  overflow: hidden;
}
.audio-player__title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.audio-player__artist {
  margin-top: 2px;
  font-weight: 600;
  font-size: 12px;
  color: var(--gp-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.audio-player__controls { display: flex; align-items: center; gap: 6px; flex: none; }
.audio-player__btn {
  border: none;
  background: transparent;
  color: var(--gp-text);
  cursor: pointer;
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 999px;
  padding: 0;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease);
}
.audio-player__btn:hover { transform: scale(1.1); background: rgba(255, 255, 255, 0.14); }
.audio-player__btn svg { width: 16px; height: 16px; fill: currentColor; }
.audio-player__btn--play {
  width: 38px; height: 38px;
  background: rgba(255, 255, 255, 0.18);
}
.audio-player__btn--play svg { width: 18px; height: 18px; }
.audio-player__btn--play:hover { background: rgba(255, 255, 255, 0.3); }

.audio-player__volume { display: flex; align-items: center; gap: 8px; flex: none; }
.audio-player__btn--mute { width: 30px; height: 30px; }
.audio-player__btn--mute:hover { transform: none; }
.audio-player__volume-range { width: 68px; flex: none; }

.audio-player__close {
  flex: none;
  width: 28px; height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--gp-muted);
  font-size: 17px; line-height: 1;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.audio-player__close:hover { background: rgba(255, 255, 255, 0.22); color: var(--gp-text); }

.audio-player__seek-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.audio-player__time { font-size: 11px; font-weight: 600; color: var(--gp-muted); flex: none; }
.audio-player__time--dur { text-align: right; }

/* Sliders (seek + volume) */
.audio-player__range,
.audio-player__volume-range {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}
.audio-player__range { flex: 1; }
.audio-player__range::-webkit-slider-thumb,
.audio-player__volume-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.audio-player__range::-moz-range-thumb,
.audio-player__volume-range::-moz-range-thumb {
  width: 13px; height: 13px; border: none; border-radius: 999px; background: #fff;
}

/* Phones: drop the bar below the header and let it span the width so it
   never overlaps the logo / Contact link. */
@media (max-width: 720px) {
  .audio-player { top: 10px; left: 10px; }
  .audio-player__bar {
    top: 52px;
    left: -10px;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }
  .audio-player__meta { min-width: 0; flex: 1; max-width: none; }
  .audio-player__volume-range { width: 52px; }
}
@media (max-width: 420px) {
  .audio-player__volume { display: none; }
}
