/* David Michael M — GENESIS ONE 3 tritone: charcoal -> dark tan -> guitar tan */
:root {
  --bg: #232926;
  --card: #2a2f2c;
  --card-2: #1e2220;
  --panel: rgba(30, 34, 32, .93);
  --line: #4d4840;
  --text: #f3efe8;
  --muted: #d2c9bb;
  --ink: #241d17;
  --amber: #e8a54b;
  --amber-2: #f3bd6e;
  --on-amber: #1a1206;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  /* one gradient over the whole document height (not fixed: unreliable on iOS) */
  background: linear-gradient(155deg, #232926 0%, #2b302c 16%, #45413a 40%, #a08d78 74%, #c2ad95 100%);
  background-repeat: no-repeat;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber-2); }
a:hover { color: #ffd59a; }
:focus-visible { outline: 3px solid var(--amber-2); outline-offset: 3px; border-radius: 6px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.narrow p { max-width: 62ch; }
.narrow .panel { max-width: 780px; }

/* hero */
.hero { padding: 3.5rem 0 3.5rem; }
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.75rem; }
.portrait {
  width: 240px; height: 240px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--amber);
  box-shadow: 0 0 0 8px rgba(232,165,75,.14), 0 20px 50px rgba(0,0,0,.5);
}
h1, h2 { line-height: 1.15; margin: 0 0 .75rem; letter-spacing: -.01em; }
h1 { font-size: clamp(2.25rem, 7vw, 3.75rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 750; }
h2::after { content: ""; display: block; width: 3rem; height: 3px; margin-top: .6rem; background: var(--amber); border-radius: 2px; }
.tagline { font-size: clamp(1.1rem, 2.6vw, 1.35rem); color: var(--muted); margin: 0 0 1.75rem; max-width: 32ch; }
/* platform row: 2x2 on phone, one line from 800px */
.buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; width: 100%; max-width: 22rem; margin: 0 auto; }
.buttons .btn { justify-content: center; padding: .65rem .9rem; font-size: .95rem; gap: .45rem; }
.btn {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 48px;
  padding: .75rem 1.35rem; border-radius: 999px; font-weight: 700; text-decoration: none;
  transition: background-color .2s, color .2s, transform .2s;
}
.btn-primary { background: var(--amber); color: var(--on-amber); }
.btn-primary:hover { background: var(--amber-2); color: var(--on-amber); transform: translateY(-1px); }
.btn-secondary { color: var(--text); border: 2px solid var(--line); background: rgba(30,34,32,.7); }
.btn-secondary:hover { color: var(--text); border-color: var(--amber); }
.sp-icon, .pf-icon { flex: none; }

@media (min-width: 800px) {
  .hero { padding: 5rem 0 5.5rem; }
  .hero-inner { flex-direction: row; text-align: left; gap: 3.5rem; justify-content: center; }
  .portrait { width: 340px; height: 340px; }
  .buttons { display: flex; flex-wrap: nowrap; max-width: none; margin: 0; }
  .buttons .btn { padding: .6rem 1rem; }
}

/* sections */
.section { padding: 3rem 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem 1.5rem; box-shadow: 0 12px 32px rgba(0,0,0,.18); }
.panel p:last-child { margin-bottom: 0; }
@media (min-width: 800px) { .panel { padding: 2.25rem 2.5rem; } }
.panel p { margin: 0 0 1rem; }
#about p { font-size: 1.15rem; }

/* songs */
.song-grid { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr); }
/* one card per row on phones so the Spotify player has room; 2 from 600px, 3 from 960px */
@media (min-width: 600px) { .song-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; } }
@media (min-width: 960px) { .song-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
.song {
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(160deg, var(--card), var(--card-2));
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}

/* one square media frame for every card (still cover or animated loop) */
.song { position: relative; }
.song-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--card-2); border-bottom: 1px solid var(--line); }
.song-visual { display: block; width: 100%; height: 100%; }
.song-art { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-toggle {
  position: absolute; top: .5rem; right: .5rem; width: 40px; height: 40px; padding: 0;
  display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  color: #fff; background: rgba(20,22,21,.72); border: 1px solid rgba(255,255,255,.35);
}
.media-toggle:hover { background: rgba(20,22,21,.9); border-color: var(--amber); }
.media-toggle:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.media-toggle .i-play, .media-toggle[aria-pressed="true"] .i-pause { display: none; }
.media-toggle[aria-pressed="true"] .i-play { display: block; }
.song-title { margin: .7rem .85rem .15rem; font-size: 1rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.song-hint {
  align-self: flex-start; margin: 0 .85rem .6rem; padding: .3rem 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 500; line-height: 1.3; text-align: left; color: var(--amber-2); text-decoration: none;
}
.song-hint:hover { text-decoration: underline; color: var(--amber-2); }
.song-hint:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
.song-embed { display: block; width: calc(100% - 1.7rem); height: 80px; margin: auto .85rem .5rem; border: 0; background: var(--card-2); }
.song-links { display: flex; flex-wrap: wrap; gap: .15rem .9rem; margin: 0 .85rem .85rem; font-size: .85rem; }
.song-links a { color: var(--amber-2); padding: .2rem 0; }
/* phones: single full-width cards */
@media (max-width: 599px) {
  .song-title { font-size: 1.15rem; margin: .85rem 1rem .15rem; }
  .song-hint { margin: 0 1rem .7rem; }
  .song-embed { width: calc(100% - 2rem); margin: auto 1rem .6rem; }
  .song-links { margin: 0 1rem .9rem; gap: .15rem 1.4rem; font-size: .95rem; }
  .song-links a { padding: .35rem 0; }
}
@media (min-width: 960px) {
  .song-title { font-size: 1.15rem; margin: .85rem 1.1rem .15rem; }
  .song-hint { margin: 0 1.1rem .7rem; }
  .song-embed { width: calc(100% - 2.2rem); margin: auto 1.1rem .6rem; }
  .song-links { font-size: .92rem; }
  .song-links { margin: 0 1.1rem 1rem; gap: .15rem 1.25rem; }
}

/* footer */
/* footer sits on the light brown end of the gradient: dark text */
.site-footer { border-top: 1px solid rgba(36,29,23,.25); padding: 1.75rem 0 2.25rem; color: var(--ink); font-size: .95rem; font-weight: 500; }
.site-footer a { color: var(--ink); font-weight: 700; }
.site-footer a:hover { color: #000; }
.site-footer :focus-visible { outline-color: var(--ink); }
.footer-inner { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; }
.footer-inner p { margin: 0; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; padding: 0; }
.footer-links a { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem 0; }
.footer-links svg { width: 16px; height: 16px; flex: none; }

/* 404 */
.notfound { min-height: 100vh; display: flex; align-items: center; padding: 3rem 0; }
.notfound .panel { max-width: 36rem; }
.notfound .eyebrow { color: var(--amber); font-weight: 800; font-size: 1.1rem; letter-spacing: .15em; margin: 0 0 .5rem; }
.notfound p { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .song:hover, .btn-primary:hover { transform: none; }
}

/* animated cards: the whole frame is a "play full video" button; the small pause toggle sits above it */
.song-play {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; margin: 0;
  border: 0; background: transparent; cursor: pointer; color: #fff;
  display: flex; align-items: flex-end; justify-content: flex-start;
}
.play-badge {
  display: inline-flex; align-items: center; gap: .35rem; margin: .6rem; padding: .4rem .75rem .4rem .6rem;
  border-radius: 999px; background: rgba(20,22,21,.78); border: 1px solid rgba(255,255,255,.35);
  font: 600 .9rem/1 inherit; font-family: inherit;
}
.play-badge svg { display: block; }
.song-play:hover .play-badge { border-color: var(--amber); background: rgba(20,22,21,.92); }
.song-play:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.media-toggle { z-index: 2; }

/* in-page video player */
.player { padding: 0; border: 0; background: transparent; max-width: min(94vw, 960px); width: 100%; color: var(--text); }
.player::backdrop { background: rgba(10,12,11,.82); }
.player-box { background: #151816; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.player-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem .5rem .5rem 1rem; }
.player-title { margin: 0; font-size: 1.05rem; }
.player-title::after { display: none; }
.player-close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; flex: none; }
.player-close:hover { border-color: var(--amber); }
.player-close:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.player-video { display: block; width: 100%; max-height: calc(100vh - 7rem); background: #000; }
/* full-song audio in the same player: cover art above native controls */
.player-song { display: grid; gap: .75rem; padding: 0 1rem 1rem; }
.player-song[hidden], .player-video[hidden] { display: none; }
.player-cover { display: block; width: min(100%, 360px, calc(100vh - 12rem)); height: auto; aspect-ratio: 1 / 1; margin: 0 auto; border-radius: 8px; object-fit: cover; }
.player-audio { display: block; width: 100%; }
