/*
Theme Name: page-b
Theme URI: https://example.com/page-b
Author: Guillaume Péret
Description: Block theme for PAGE B one-page music website.
Version: 1.0.0
Text Domain: page-b
*/

:root {
  --cream: #f5eee8;
  --cream-alt: #f1e5e2;
  --pink-soft: #dca4ae;
  --magenta: #b84f70;
  --dark: #21181d;
  --text-muted: #68575c;
  --line: rgba(33, 24, 29, 0.14);
  --panel: rgba(255, 255, 255, 0.20);
  --max-width: 1180px;
  --transition: 180ms ease;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--cream);
  color: var(--dark);
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.55;
  font-weight: 400;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

p, li, a, button, input, select, textarea {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.page-b-shell { min-height: 100vh; }

.page-b-container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 60px;
  position: relative;
}

@media (min-width: 901px) {
  .site-header__inner {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
    padding-right: 1rem;
    padding-left: 1rem;
  }
}

.site-brand {
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(2.5rem, 2.8vw, 3.5rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 300;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 1.7rem;
}

.site-nav a {
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(0.82rem, 0.9vw, 1.1rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--dark);
}

.hero {
  position: relative;
  background-color: #120b0d;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 10, 13, 0.72) 0%, rgba(17, 10, 13, 0.38) 25%, rgba(17, 10, 13, 0.18) 55%, rgba(17, 10, 13, 0.12) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(17, 10, 13, 0.08);
}

.hero__layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 480px;
}

.hero__copy {
  max-width: 420px;
  margin: 0 auto;
  padding: 2.2rem 0 2.6rem;
  text-align: center;
  position: static;
  top: -8%;
  z-index: 1;
}

.hero__title {
  margin: 0;
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(5.5rem, 7vw, 8rem);
  line-height: 0.92;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 300;
  color: #f7f1ec;
  position: relative;
  top: -1.5rem;
  white-space: nowrap;
}

.hero__subtitle {
  margin: 1.2rem 0 2rem;
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(0.875rem, 1.2vw, 0.9375rem);
  line-height: 1.25;
  color: rgba(247, 241, 236, 0.68);
  font-weight: 400;
}

.hero__subtitle::first-line {
  font-size: clamp(1.375rem, 1.7vw, 1.5rem);
  font-weight: 500;
  line-height: 1.25;
  color: #f7f1ec;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-b-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.82rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.02);
  color: #f7f1ec;
  border-radius: 999px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
  cursor: pointer;
}

.page-b-button:hover,
.page-b-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(216, 164, 174, 0.8);
  background: rgba(184, 79, 112, 0.13);
}

.hero .page-b-button {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.08);
}

.hero .page-b-button:hover,
.hero .page-b-button:focus-visible {
  border-color: rgba(184, 79, 112, 0.78);
  background: rgba(184, 79, 112, 0.16);
}

.page-b-button--light {
  border-color: rgba(33, 24, 29, 0.22);
  background: transparent;
  color: var(--dark);
}

.section {
  padding: clamp(3.5rem, 6vw, 5rem) 0;
}

.section--album {
  background: var(--cream);
}

.section--alt {
  background: var(--cream-alt);
}

.section--about {
  background: var(--cream);
}

.section-heading {
  margin: 0 0 0.8rem;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2.5rem, 3vw, 3rem);
  line-height: 1.02;
  letter-spacing: 0;
  text-transform: lowercase;
  font-weight: 400;
  color: var(--dark);
}

.section--album .section-heading,
.section--alt .section-heading {
  font-family: "DM Sans", sans-serif;
  font-weight: 300;
  letter-spacing: -0.02em;
  font-size: clamp(2.2rem, 2.65vw, 2.65rem);
}

#a-propos .section-heading {
  text-transform: none;
}

#a-propos .section-heading:first-letter {
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .section {
    padding: 2.6rem 0;
  }

  .section-heading {
    font-size: clamp(1.9rem, 5.8vw, 2.25rem);
  }

  .section-subheading {
    margin-bottom: 1.4rem;
  }

  .album-grid {
    gap: 1.5rem;
  }

  .album-footer {
    margin-top: 1.45rem;
    align-items: center;
    gap: 0.7rem;
  }

  .page-b-button,
  .album-bandcamp {
    width: min(85%, 280px);
    max-width: 280px;
    min-height: 42px;
    height: 42px;
    margin: 0 auto;
    display: inline-flex;
    flex: 0 0 auto;
    align-self: center;
    box-sizing: border-box;
  }

  .about-layout {
    gap: 1.2rem;
  }

  .page-b-footer {
    padding-top: 1.2rem;
  }
}

.section-subheading {
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
}

.album-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.5fr);
  gap: 2rem;
  align-items: start;
}

.cover-card {
  max-width: 500px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.cover-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.album-panel {
  min-width: 0;
}

.track-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.track-item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.2rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(33, 24, 29, 0.08);
}

.track-number {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
}

.track-title {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--dark);
}

.track-action {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(33, 24, 29, 0.18);
  color: var(--dark);
  border-radius: 999px;
  min-height: 32px;
  min-width: 32px;
  padding: 0.36rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.track-action:hover,
.track-action:focus-visible {
  border-color: rgba(184, 79, 112, 0.7);
  background: rgba(184, 79, 112, 0.06);
}

.track-action.is-disabled {
  opacity: 0.5;
  cursor: default;
}

.album-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.album-bandcamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.2rem;
  border: 1px solid rgba(33, 24, 29, 0.22);
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark);
}

.album-bandcamp.is-empty {
  opacity: 0.58;
  pointer-events: none;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.5fr);
  gap: 2.2rem;
  align-items: center;
}

.about-photo {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  max-width: 360px;
  width: 100%;
  justify-self: center;
}

.about-photo img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.about-copy {
  color: var(--text-muted);
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
}

.about-copy strong {
  font-size: 1.5rem;
  line-height: 1.4;
}

.about-copy h2 {
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .about-copy strong {
    font-size: 1.05rem;
    letter-spacing: 0.02em;
  }
}

.about-copy p {
  text-align: left;
}

.about-copy p {
  max-width: 60ch;
  margin: 0 0 1rem;
}

.about-copy strong {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  color: var(--dark);
}

.page-b-footer {
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--cream);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--dark);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links--contact {
  gap: 0;
}

.footer-mailto {
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition), text-decoration-color var(--transition);
}

.footer-mailto:hover,
.footer-mailto:focus-visible {
  color: var(--dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  outline: none;
}

.footer-grid .footer-links span {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-credit img {
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
}

.back-to-top {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (min-width: 901px) {
  .footer-grid {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    text-align: center;
  }

  .footer-links,
  .footer-links--contact {
    justify-content: center;
    width: 100%;
  }

  .footer-links:not(.footer-links--contact) {
    display: contents;
  }

  .back-to-top {
    position: static;
    transform: none;
  }
}

.audio-player {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(120%);
  transition: transform 220ms ease, opacity 220ms ease;
}

.audio-player.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.audio-player__inner {
  width: min(720px, 100%);
  background: rgba(52, 39, 45, 0.9);
  color: #f5efe7;
  border-radius: 18px;
  padding: 0.9rem 1rem;
  box-shadow: 0 24px 54px rgba(18, 14, 20, 0.4);
}

.audio-player__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.audio-player__title {
  min-width: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-player__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.audio-player__button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(245, 239, 231, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: #f5efe7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.audio-player__button:hover,
.audio-player__button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(216, 164, 174, 0.8);
  background: rgba(184, 79, 112, 0.12);
}

.audio-player__close {
  font-size: 1rem;
  line-height: 1;
}

.audio-player__range {
  width: 100%;
  accent-color: var(--magenta);
}

.audio-player__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.72rem;
  color: rgba(245, 239, 231, 0.8);
}

@media (max-width: 900px) {
  .site-header__inner {
    flex-wrap: wrap;
    padding: 0.8rem 0;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .hero__layout,
  .album-grid,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .hero__layout {
    min-height: 420px;
  }

  .hero__copy {
    max-width: none;
    padding: 2.2rem 0 1rem;
  }

  .section-heading {
    letter-spacing: 0.06em;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 2.5rem 0;
  }

  .page-b-button,
  .album-bandcamp {
    width: min(85%, 270px);
    max-width: 270px;
    min-height: 42px;
    height: 42px;
    flex: 0 0 auto;
    align-self: center;
    box-sizing: border-box;
  }

  .page-b-container {
    width: min(var(--max-width), calc(100% - 1.25rem));
  }

  .site-header__inner {
    min-height: 52px;
    padding: 0.45rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .site-brand {
    font-size: 1.3rem;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  .site-nav {
    gap: 0.7rem;
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
  }

  .site-nav a {
    letter-spacing: 0.08em;
    font-size: 0.58rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .hero__layout {
    min-height: 190px;
  }

  .hero__actions {
    justify-content: center;
    bottom: 3%;
  }

  .hero__actions .page-b-button {
    width: auto;
    min-height: 32px;
    padding: 0.5rem 1rem;
    font-size: 0.55rem;
  }

  .hero__copy {
    max-width: 100%;
    padding: 1.5rem 0 1.4rem;
  }

  .hero__title {
    font-size: clamp(3.2rem, 15vw, 4.8rem);
    letter-spacing: 0.12em;
    top: -0.75rem;
  }

  .hero__subtitle {
    margin: 0.75rem 0 1.1rem;
    font-size: 0.75rem;
  }

  .hero__subtitle::first-line {
    font-size: 1.02rem;
    line-height: 1.25;
  }

  .section {
    padding: 3rem 0;
  }

  .album-footer {
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
  }

  .page-b-button,
  .album-bandcamp {
    width: min(85%, 270px);
    max-width: 270px;
    min-height: 42px;
    height: 42px;
    margin: 0 auto;
    flex: 0 0 auto;
    align-self: center;
    box-sizing: border-box;
  }

  .cover-card {
    max-width: 260px;
    margin: 0 auto;
  }

  .track-item {
    grid-template-columns: 2.2rem minmax(0, 1fr) auto;
    gap: 0.55rem;
    min-height: 2.8rem;
    padding: 0.5rem 0;
  }

  .track-number {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }

  .track-title {
    font-size: 0.98rem;
    line-height: 1.35;
    word-break: break-word;
  }

  .track-action {
    min-height: 30px;
    min-width: 30px;
    padding: 0.3rem 0.5rem;
    justify-self: end;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .about-photo {
    max-width: 200px;
    margin: 0 auto;
  }

  .about-photo img {
    max-height: 300px;
  }

  .about-copy {
    font-size: 0.95rem;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  .footer-grid > .footer-links:not(.footer-links--contact) {
    display: contents;
  }

  .footer-links {
    width: 100%;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .footer-links--contact {
    justify-content: center;
    text-align: center;
  }

  .footer-mailto {
    font-size: 1rem;
  }

  .back-to-top,
  .footer-grid .footer-links span {
    font-size: 0.7rem;
  }

  .footer-grid .footer-links span {
    align-self: center;
    text-align: center;
  }

  .back-to-top {
    align-self: center;
    text-align: center;
  }

  .audio-player {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
  }

  body:has(.audio-player.is-visible) {
    padding-bottom: 7rem;
  }

  .audio-player__button {
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    text-align: center;
  }

  .audio-player__inner {
    padding: 0.75rem 0.8rem;
  }
}

@media (max-width: 768px) {
  .album-footer .page-b-button,
  .album-footer .album-bandcamp {
    width: 190px;
    max-width: calc(100% - 32px);
    min-height: 34px;
    height: 34px;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    font-size: 11px;
    line-height: 1.1;
    text-align: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    flex: 0 0 auto;
    align-self: center;
    box-sizing: border-box;
  }

  .album-footer {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
