/* Andrew O'Halloran Music — black on white; the homepage hero keeps white text over its photo. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f5f3;
  --surface-2: #ececea;
  --border: #d9d6d1;
  --text: #000000;
  --muted: #4a4640;
  --accent: #000000;
  --accent-hi: #333333;
  --accent-ink: #ffffff;
  --blue: #000000;
  --wf-base: rgba(0,0,0,0.28);
  --wf-played: #000000;
  --radius: 6px;
  --player-h: 84px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--font); /* headings use Inter too */
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
html, body { overflow-x: clip; } /* 100vw includes the scrollbar; never allow a sideways scroll */
body.has-player { padding-bottom: calc(var(--player-h) + 12px); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: 0.005em; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: 1.5rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* header / footer */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--serif); font-weight: 500; font-size: 1.1rem; }
.brand img { border-radius: 50%; filter: grayscale(1); width: 44px; height: 44px; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav .nav__account { border: 1px solid var(--border); margin-left: 8px; color: var(--text); }
main { flex: 1; }
body.short-page main { min-height: 100vh; min-height: 100svh; }
body.short-page .wrap--narrow { max-width: 1180px; margin-inline: auto; }
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 28px; margin-top: 64px; color: var(--muted); font-size: 0.92rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.site-footer strong { color: var(--text); display: block; margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer p { margin: 0; }
.site-footer__legal { max-width: 1180px; margin: 32px auto 0 !important; padding: 0 24px; font-size: 0.82rem; }

/* layout */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 24px 0; }
.wrap--narrow { max-width: 780px; }
.page-title { margin-bottom: 24px; }
.eyebrow { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: 0.04em; font-size: 1rem; color: var(--accent); margin: 0 0 10px; }
.section { margin-top: 56px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section__head a { color: var(--muted); font-size: 0.92rem; text-decoration: none; }
.section__head a:hover { color: var(--accent); }
.empty { color: var(--muted); padding: 40px 0; }
.notice { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); padding: 14px 16px; border-radius: 8px; }

/* hero: full-viewport antique sepia photograph, white type */
.hero { color: #fff; position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; background: #0f0d0b var(--hero) 30% 50%/cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(15,13,11,.7) 0%, rgba(15,13,11,.25) 60%, rgba(15,13,11,.1) 100%),
  linear-gradient(0deg, rgba(15,13,11,.9) 0%, rgba(15,13,11,0) 30%),
  radial-gradient(ellipse at center, rgba(0,0,0,0) 50%, rgba(0,0,0,.5) 100%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(120,84,40,.12); mix-blend-mode: multiply; }
.hero__inner { width: 100%; max-width: 1180px; margin: 0 auto; padding: 96px 24px clamp(88px, 12vh, 150px); }
.hero h1 { white-space: nowrap; font-size: clamp(1.4rem, 4.2vw, 3.5rem); line-height: 1.05; text-shadow: 0 2px 28px rgba(0,0,0,.6); }
.hero__lead { max-width: 46ch; color: #ffffff; font-size: 1.1rem; margin: 24px 0 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
body.home .site-header { position: absolute; left: 0; right: 0; background: transparent; backdrop-filter: none; border-bottom: 0; }
body.home .brand { color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.8); }
body.home .nav a { color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.8); }
body.home .nav a:hover, body.home .nav a[aria-current="page"] { background: rgba(255,255,255,.12); }
.social-embed { display: grid; place-items: start center; width: 100%; margin-bottom: 24px; padding: 24px; overflow: hidden; background: var(--bg); border-block: 1px solid var(--border); }
.social-embed iframe { display: block; width: 100%; max-width: 960px; height: max(760px, 80vh); border: 0; background: var(--bg); color-scheme: light; }
.socials-page__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 0.95rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); padding: 11px 20px; border-radius: 999px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--accent-ink); }
.btn--ghost { background: transparent; }
.btn--small { padding: 7px 14px; font-size: 0.85rem; }
.icon-btn { background: none; border: 0; color: var(--text); cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; }
.play-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; transition: transform .12s, background .15s; }
.play-btn:hover { transform: scale(1.06); background: var(--accent-hi); }
.play-btn svg { width: 22px; height: 22px; grid-area: 1 / 1; }
.play-btn--lg { width: 56px; height: 56px; }
.play-btn--lg svg { width: 28px; height: 28px; }
.play-btn .i-pause, .play-btn.is-playing .i-play { display: none; }
.play-btn.is-playing .i-pause { display: block; }

/* chips, tags */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 0.9rem; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.chip span { color: var(--muted); font-size: 0.8rem; margin-left: 4px; }
.chip:hover { border-color: var(--accent); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.is-on span { color: rgba(255,255,255,0.75); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; }
.tag { font-size: 0.8rem; color: var(--muted); text-decoration: none; border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; }
.tag:hover { color: var(--accent); border-color: var(--accent); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 20px; }
.card__art { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 1; }
.card__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card__art img { transform: scale(1.04); }
.card .play-btn { position: absolute; right: 12px; bottom: 12px; opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.card:hover .play-btn, .card .play-btn:focus-visible, .card .play-btn.is-playing { opacity: 1; transform: none; }
@media (hover: none) { .card .play-btn { opacity: 1; transform: none; } }
.card__title { font-size: 1rem; margin: 12px 0 2px; letter-spacing: 0; font-weight: 600; }
.card__title a { text-decoration: none; }
.card__sub { margin: 0; color: var(--muted); font-size: 0.85rem; }

/* list rows */
.rows { list-style: none; margin: 0; padding: 0; display: grid; }
.rows--album { margin-top: 32px; }
.row { display: grid; grid-template-columns: auto 56px minmax(140px, 1.1fr) minmax(120px, 2fr) 44px auto; align-items: center; gap: 16px; padding: 10px 12px; border-radius: var(--radius); border-bottom: 1px solid var(--border); }
.rows--album .row { grid-template-columns: 28px auto 56px minmax(140px, 1.1fr) minmax(120px, 2fr) 44px auto; }
.row:hover { background: var(--surface); }
.row.is-current { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.row__n { color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.row__art img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.row__text { min-width: 0; display: grid; }
.row__title { font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__sub { color: var(--muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__wave { width: 100%; height: 40px; cursor: pointer; display: block; }
.time { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; text-align: right; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.filters input[type=search] { flex: 1 1 260px; }
input[type=search], select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 10px 16px; }
input[type=search]:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.select { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.85rem; }
.select select { padding: 9px 14px; }
#cat-count { margin: 16px 0 8px; font-size: 0.9rem; }

/* detail pages */
.detail { display: grid; grid-template-columns: minmax(220px, 420px) 1fr; gap: 40px; align-items: start; }
.detail__art { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.detail__info h1 { margin-bottom: 6px; }
.detail__player { display: flex; align-items: center; gap: 16px; margin: 28px 0 8px; }
.detail__wave { flex: 1; height: 96px; min-width: 0; cursor: pointer; display: block; }
.detail__desc { color: var(--text); max-width: 62ch; margin: 20px 0 0; }
.detail__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* albums index: cover left, tracklist right, per album */
.album-block { display: grid; grid-template-columns: minmax(200px, 320px) 1fr; gap: 40px; align-items: start; margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--border); }
.album-block:first-of-type { margin-top: 32px; padding-top: 0; border-top: 0; }
.album-block__art { position: sticky; top: 24px; }
.album-block__cover { position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.album-block__cover img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.album-block__cover .play-btn--lg { position: absolute; inset: 0; margin: auto; }
.album-block__title { margin: 16px 0 4px; }
.album-block .rows--album { margin-top: 0; }

/* callout, prose, videos */
.callout { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px; }
.callout p { max-width: 68ch; color: var(--text); margin: 12px 0 0; }
.prose { color: var(--text); }
.prose h2, .prose h3 { margin: 32px 0 10px; color: var(--text); }
.prose p, .prose li { max-width: 74ch; }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose li { margin: 6px 0; }
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 28px; max-width: 1000px; }
.video { margin: 0; }
.video__frame { aspect-ratio: 16 / 9; }
.video iframe, .video video { width: 100%; height: 100%; border: 0; border-radius: var(--radius); background: #000; }
.video figcaption { margin-top: 8px; font-weight: 600; }
.video figcaption span { display: block; color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.video--home { width: 100%; max-width: none; margin: 0 0 24px; } /* same left/right edges as the thumbnail grids */

/* projects, project files and account */
.page-intro { max-width: 62ch; color: var(--muted); margin: -8px 0 30px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.project-card { overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.project-card > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.project-card__body { padding: 24px; }
.project-card__body h2 { margin-bottom: 10px; }
.project-card__body p:not(.eyebrow) { color: var(--muted); }
.empty-state { margin-top: 32px; }
.empty-state .btn { margin-top: 18px; }
.file-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.file-row { display: grid; grid-template-columns: 54px minmax(180px, 1fr) auto auto; align-items: center; gap: 16px; padding: 13px 12px; border-bottom: 1px solid var(--border); }
.file-row:hover { background: var(--surface); }
.file-row__icon { display: grid; place-items: center; width: 48px; height: 48px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; font-size: .72rem; font-weight: 700; }
.file-row__text { min-width: 0; display: grid; }
.file-row__text span, .file-row__meta { color: var(--muted); font-size: .86rem; }
.account-form { display: grid; gap: 16px; max-width: 520px; margin-top: 24px; }
.account-form label { display: grid; gap: 6px; font-weight: 600; }
.account-form input { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.account-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.account-form__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn[disabled] { cursor: not-allowed; opacity: .48; }
.status--error { border-left-color: #ff8585; }
.status--success { border-left-color: #78d7a5; }

/* player bar */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--player-h); display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(220px, 3fr) minmax(200px, 1fr); align-items: center; gap: 20px; padding: 10px 24px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--border); }
.player__close { position: absolute; top: 2px; right: 8px; width: 24px; height: 24px; padding: 0; background: none; border: 0; border-radius: 50%; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.player__close:hover { color: var(--text); background: var(--surface-2); }
.player__meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player__meta img { border-radius: 8px; object-fit: cover; flex: none; }
.player__text { display: grid; min-width: 0; }
.player__text a { font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__text span { color: var(--muted); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__controls { display: flex; align-items: center; gap: 6px; }
.player__wave { display: flex; align-items: center; gap: 12px; min-width: 0; }
#pl-wave { flex: 1; height: 48px; min-width: 0; cursor: pointer; display: block; }
.player__extra { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
#pl-vol { width: 96px; accent-color: var(--accent); }
.player .time { width: 40px; text-align: center; }

/* dialog */
.dialog { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); padding: 28px; width: min(480px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(5,6,8,.72); backdrop-filter: blur(3px); }
.dialog__close { position: absolute; top: 10px; right: 12px; margin: 0; }
.dialog__close button { background: none; border: 0; color: var(--muted); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.dialog h2 { font-size: 1.35rem; margin-bottom: 4px; }
.dialog p { color: var(--text); font-size: 0.93rem; }
.amounts { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 10px; }
.amounts button { font: inherit; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.amounts button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.amount-input { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.amount-input input { font: inherit; width: 8em; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.dialog .btn { width: 100%; }
.fineprint { font-size: 0.8rem !important; color: var(--muted) !important; }

/* responsive */
@media (max-width: 900px) {
  :root { --player-h: 128px; }
  .site-header { padding: 10px 16px; }
  .nav { margin-left: auto; }
  .brand span { display: none; }
  .wrap { padding: 24px 16px 0; }
  .site-footer__cols { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; gap: 24px; }
  .detail__art { max-width: 360px; }
  .album-block { grid-template-columns: 1fr; gap: 20px; }
  .album-block__art { position: static; max-width: 280px; }
  .row, .rows--album .row { grid-template-columns: auto 48px 1fr auto; gap: 12px; }
  .rows--album .row { grid-template-columns: 22px auto 48px 1fr auto; }
  .row__art img { width: 48px; height: 48px; }
  .row__wave, .row > .time { display: none; }
  .row .btn span { display: none; }
  .row .btn { padding: 8px; }
  .player { grid-template-columns: 1fr auto; grid-template-areas: "meta controls" "wave wave"; padding: 8px 16px; gap: 6px 12px; }
  .player__meta { grid-area: meta; }
  .player__controls { grid-area: controls; }
  .player__wave { grid-area: wave; }
  .player__extra { display: none; }
  .file-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; }
  .file-row__meta { display: none; }
}
@media (max-width: 680px) {
  .site-header { align-items: stretch; gap: 8px; }
  .brand { align-self: flex-start; }
  .nav { width: calc(100vw - 32px); margin: 0; padding-bottom: 2px; }
  .nav a { flex: none; padding: 7px 10px; font-size: .88rem; }
  .nav .nav__account { margin-left: 4px; }
  .hero__inner { padding-bottom: 72px; }
  .hero h1 { white-space: normal; }
  .social-embed { padding-inline: 0; }
  .social-embed iframe { height: 75vh; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.auth-form { display: grid; gap: 12px; max-width: 380px; }
.auth-form label { display: grid; gap: 4px; font-size: 0.9rem; }
.auth-form input { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; }
.auth-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-actions { display: flex; gap: 8px; flex-wrap: wrap; }
