/* ===========================================================================
   Osei Essed — site styles
   Plain CSS. No build step.
   =========================================================================== */

:root {
  --bg:        #313133;
  --bg-panel:  #3a3a3d;
  --bg-nav:    #121213;
  --text:      #ece8e1;
  --text2:     rgba(236, 232, 225, 0.72);
  --text3:     rgba(236, 232, 225, 0.44);
  --line:      rgba(236, 232, 225, 0.15);
  --line-soft: rgba(236, 232, 225, 0.09);
  --serif:     'EB Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino,
               Georgia, 'Times New Roman', serif;
  --nav-h:     78px;
  --page:      1240px;   /* content column, shared by the nav and the grids */
  --gutter:    40px;     /* breathing room at the left and right edges */
  --flip:      520ms;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding-top: var(--nav-h);
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* ── NAV ─────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg-nav);
  display: flex;
  align-items: center;
  z-index: 100;
}

/* Same column as the poster grids, so the name and the links line up with
   the outer edges of the posters. */
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Name hard left, links hard right, weighed against each other. */
.nav-name {
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.nav-name:hover { opacity: 0.75; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

/* ── HERO ────────────────────────────────────────────────────────────────── */
.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: 40px var(--gutter) 0;
}

/* Wide banner, edges lined up with the nav and the poster grids. No aspect
   ratio here, so the full frame shows uncropped; the media queries below
   crop it once the screen is too narrow to carry a wide image. */
.hero-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: 40% center;
}

/* ── SOCIALS ──────────────────────────────────────────────────────────────── */
/* Same glyphs and color as the streaming row on saulsimonmacwilliams.com, 20% larger.
   The row takes the gap above the first section, so Film sits just under it. */
.socials {
  max-width: var(--page);
  margin: 0 auto;
  padding: 110px var(--gutter) 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4.8px;
}

/* each glyph centres in a 43.2px box; pull the first box left so the glyph
   itself, not the box, lines up with the left edge of Film */
.socials a:first-child { margin-left: -8.4px; }

.socials a {
  color: var(--text3);
  text-decoration: none;
  font-size: 26.4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 43.2px;
  height: 43.2px;
  transition: color 0.15s;
}

.socials a:hover { color: var(--text); }

/* hand-drawn glyphs (Deezer) sit in the same 1em box as the icon font */
.socials-svg { width: 1em; height: 1em; }

.socials-badge {
  font-family: 'Work Sans', sans-serif;
  font-size: 14.4px;
  font-weight: 600;
  width: 26.4px;
  height: 26.4px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

.socials + #catalog .catalog-section:first-child { padding-top: 28px; }

/* ── CATALOG SECTIONS ────────────────────────────────────────────────────── */
.catalog-section {
  max-width: var(--page);
  margin: 0 auto;
  padding: 110px var(--gutter) 0;
}

.section-label {
  margin: 0 0 30px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text3);
}

.poster-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.poster-grid--covers .poster-inner { aspect-ratio: 1 / 1; }

.poster {
  perspective: 1600px;
  cursor: pointer;
}

/* Art with no music: nothing here should read as clickable, so no pointer
   and no veil on hover. The card is the picture and nothing else. */
.poster.static { cursor: default; }
.poster.static .poster-veil { display: none; }

.poster-inner {
  position: relative;
  aspect-ratio: 2 / 3;
  transform-style: preserve-3d;
  transition: transform var(--flip) var(--ease);
}

.poster.open .poster-inner { transform: rotateY(180deg); }

.poster-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* Poster art is never cropped: the cell keeps its 2:3 shape for the grid and
   the flip, and each image is scaled to fit inside it. Art that is not 2:3
   (the landscape and square ones) sits on the card ground with a margin. */
.poster-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #26262a;
  display: block;
}

.poster-veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  text-align: center;
  background: rgba(12, 12, 13, 0.55);
  opacity: 0;
  transition: opacity 0.35s;
}

.poster:hover .poster-veil { opacity: 1; }

.poster-veil .title { font-size: 22px; color: var(--text); }
.poster-veil .meta  { font-size: 14px; letter-spacing: 0.22em; color: var(--text3); }

.poster-back {
  transform: rotateY(180deg);
  background: #26262a;
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

.poster-back .title { font-size: 22px; color: var(--text2); }
.poster-back .hint  { font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--text3); }

/* ── SCRIM ───────────────────────────────────────────────────────────────── */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(14, 14, 15, 0.74);
  opacity: 0;
  visibility: hidden;
  transition: opacity 320ms var(--ease), visibility 0s linear 320ms;
}

.scrim.on {
  opacity: 1;
  visibility: visible;
  transition: opacity 320ms var(--ease), visibility 0s;
}

/* ── FLIP PANEL ──────────────────────────────────────────────────────────── */
/* Absolutely placed over the poster row it belongs to, above the scrim. */
.panel {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 160;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
  pointer-events: none;
}

.panel.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.panel-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 26px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text3);
  cursor: pointer;
  transition: color 0.15s;
}

.panel-close:hover { color: var(--text); }

.panel-art {
  width: 200px;
  flex-shrink: 0;
}

.panel-art img { display: block; width: 100%; }

.player {
  flex: 1;
  min-width: 0;
}

.player-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding-right: 34px;
}

.player-film {
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text3);
}

.player-now {
  font-size: 15px;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wave {
  display: block;
  width: 100%;
  height: 76px;
  cursor: pointer;
}

.wave-times {
  display: flex;
  justify-content: space-between;
  margin: 4px 0 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
}

.tracks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.track {
  display: grid;
  grid-template-columns: 26px 1fr 26px;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-top: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.track:first-child { border-top: none; }
.track:hover { background: rgba(236, 232, 225, 0.045); }

.track.current { background: rgba(236, 232, 225, 0.055); }
.track.playing { background: rgba(236, 232, 225, 0.085); }
.track.current .track-num,
.track.current .track-label,
.track.playing .track-num,
.track.playing .track-label { color: var(--text); }

.track-num {
  text-align: right;
  font-size: 14px;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
}

.track-label {
  font-size: 16px;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Playback state for the row: pause on the track that is sounding, play on the
   rest. markRows() already maintains .playing, so this needs no JS of its own. */
.track-state {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--text3);
  transition: color 0.15s;
}

.track:hover .track-state,
.track.current .track-state,
.track.playing .track-state { color: var(--text); }

.track-state .icon-pause { display: none; }
.track.playing .track-state .icon-play  { display: none; }
.track.playing .track-state .icon-pause { display: block; }

/* ── ABOUT ───────────────────────────────────────────────────────────────── */
/* Sits between the catalogue and the contact form, on the same page column and
   gutter as the poster grids, so the text lines up with the art above it. */
.about {
  max-width: var(--page);
  margin: 0 auto;
  padding: 130px var(--gutter) 0;
}

.about h2 {
  margin: 0 0 42px;
  font-weight: 400;
  font-size: clamp(32px, 5vw, 46px);
  letter-spacing: 0.01em;
}

.about-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text2);
}

.about-body p { margin: 0 0 1.25em; }
.about-body p:last-child { margin-bottom: 0; }

/* ── CONTACT ─────────────────────────────────────────────────────────────── */
.contact {
  max-width: var(--page);
  margin: 0 auto;
  padding: 130px var(--gutter) 0;
}

.contact h2 {
  margin: 0 0 42px;
  font-weight: 400;
  font-size: clamp(32px, 5vw, 46px);
  letter-spacing: 0.01em;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 900px;
}

.field-wide { grid-column: 1 / -1; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text3); }

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--text3);
}

.send {
  grid-column: 1 / -1;
  padding: 14px;
  background: var(--bg-nav);
  border: 1px solid var(--bg-nav);
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.send:hover { background: #1d1d1f; border-color: var(--line); }

.hp { position: absolute; left: -9999px; }

/* ── BOTTOM PLAYER BAR ───────────────────────────────────────────────────── */
/* Stays put once a track starts, so a poster can flip back and keep playing.
   Above the scrim (150) and the panel (160): playback outlives whatever poster
   is open, so its controls have to stay clickable while one is. */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 170;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 74px;
  padding: 0 24px;
  background: var(--bg-nav);
  border-top: 1px solid var(--line-soft);
  transform: translateY(100%);
  transition: transform 300ms var(--ease);
}

.bar.on { transform: none; }

body.has-bar { padding-bottom: 74px; }

.bar-art {
  width: 40px;
  height: 60px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.bar-art:hover { opacity: 1; }

.bar-play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--text2);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.bar-play:hover { color: var(--text); border-color: var(--text3); }
.bar-play .icon-play { margin-left: 2px; }
.bar-play .icon-pause { display: none; }
.bar.playing .bar-play .icon-play  { display: none; }
.bar.playing .bar-play .icon-pause { display: block; }

.bar-main { flex: 1; min-width: 0; }

.bar-title {
  font-size: 15px;
  color: var(--text2);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.bar-title:hover { color: var(--text); }

.bar-seek {
  height: 3px;
  background: rgba(236, 232, 225, 0.16);
  cursor: pointer;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: var(--text);
}

.bar-times {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
}

.bar-sep { opacity: 0.5; }

.bar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--text3);
  cursor: pointer;
  transition: color 0.15s;
}

.bar-close:hover { color: var(--text); }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.footer {
  margin-top: 120px;
  padding: 40px 24px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
  font-size: 14px;
  color: var(--text3);
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .poster-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  :root { --gutter: 28px; }
  .poster-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 22px; }
  .nav-links a { font-size: 15px; }
  .nav-name { font-size: 27px; }
}

@media (max-width: 700px) {
  /* not enough width for a name and five links on one line, so stack them */
  :root { --nav-h: 100px; --gutter: 22px; }
  .nav { flex-direction: column; justify-content: center; gap: 10px; padding: 10px 0; }
  .nav-inner { flex-direction: column; justify-content: center; gap: 10px; }
  .nav-name { font-size: 28px; }

  /* a wide frame gets thin on a phone, so crop in and keep him in shot */
  .hero-image { aspect-ratio: 3 / 2; }

  .panel-inner { flex-direction: column; padding: 20px; }
  .panel-art { width: 150px; margin: 0 auto; }
  .player-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .contact-form { grid-template-columns: 1fr; }
  .wave { height: 60px; }
  .bar { gap: 12px; padding: 0 14px; height: 66px; }
  body.has-bar { padding-bottom: 66px; }
  .bar-art { display: none; }
  .bar-times { display: none; }

  /* phone sizes from saulsimonmacwilliams.com, 20% larger: bigger glyphs, no gap */
  .socials { gap: 0; }
  .socials a { font-size: 33.6px; height: 48px; }
  .socials a:first-child { margin-left: -4.8px; }
  .socials-badge { width: 33.6px; height: 33.6px; font-size: 16.8px; }
}

@media (max-width: 560px) {
  .hero-image { aspect-ratio: 4 / 3; }
  .poster-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .poster-inner, .panel, .poster-veil, .scrim, .bar { transition: none; }
}
