/* jann.one. Colors and sizes taken from the old Squarespace site. */
:root {
  --bg: #fff;
  --text: #454545;
  --dark: #222;
  --muted: #8a8a8a;
  --line: #e4e4e4;
  --accent: #222;
  --font: 'Figtree', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.7 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { color: var(--dark); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p, ul, dl { margin: 0 0 1em; }
strong { font-weight: 600; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: #000; color: #fff; padding: .5em 1em; z-index: 100; }
.skip:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem 2rem;
  padding: 1.75rem clamp(16px, 3vw, 2.25rem);
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-nav a { color: var(--muted); text-decoration: none; text-transform: uppercase; font-size: .8rem; letter-spacing: .1em; padding: .2rem 0; border-bottom: 1px solid transparent; }
.site-nav a:hover { color: var(--dark); }
.site-nav a[aria-current] { color: var(--dark); border-bottom-color: currentColor; }
.site-title { text-align: right; }
.site-title a { color: #2e2e2e; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-size: clamp(1.2rem, 2.4vw, 1.75rem); line-height: 1.2; }
.site-title p { margin: .4rem 0 0; color: #999; font-size: .9rem; }

/* ---------- home grid ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); background: #111; }
.grid a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; color: #fff; text-decoration: none; }
.grid img { width: 100%; height: 100%; object-fit: cover; }
.tile-title {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  padding: 1.5rem; text-align: center; background: rgba(15, 15, 15, .7); opacity: 0; transition: opacity .25s;
}
.tile-title span { font-weight: 300; font-size: clamp(1.4rem, 3vw, 2.6rem); line-height: 1.15; letter-spacing: -.02em; }
.grid a:hover .tile-title, .grid a:focus-visible .tile-title { opacity: 1; }
@media (hover: none) {
  .tile-title { opacity: 1; inset: auto 0 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); justify-content: flex-end; padding: 2.5rem 1rem 1rem; }
  .tile-title span { font-size: 1.1rem; font-weight: 400; }
}

/* ---------- pages ---------- */
main { min-height: 60vh; }
.content { max-width: 960px; margin: 0 auto; padding: clamp(1.5rem, 5vw, 3.5rem) 16px clamp(2rem, 6vw, 4rem); }
.content.narrow { max-width: 680px; }
.page-title { text-align: center; margin-bottom: 2.5rem; }
.content > section > p, .content > section > ul:not(.gallery):not(.clip-bank):not(.albums), .content > section > blockquote, .content > section > dl, .content > p { max-width: 70ch; }
.work { padding-bottom: 2.5rem; margin-bottom: 3rem; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.work:last-of-type { border-bottom: 0; }
.work h2 .year { color: var(--muted); font-weight: 400; font-size: .7em; margin-left: .35em; }
.meta { color: var(--muted); }
.meta strong { color: var(--text); }
.statement { font-style: italic; }
.laurels p { margin-bottom: 1em; font-size: .95rem; }

.video, .audio, .image { margin: 1.75rem 0; }
.video { position: relative; aspect-ratio: 16 / 9; background: #111; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.audio iframe { width: 100%; border: 0; display: block; }
.image figcaption { margin-top: .5rem; color: var(--muted); font-size: .9rem; }
.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin: 1.75rem 0; }
.videos .video { margin: 0; }
.gallery { list-style: none; margin: 1.75rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 2rem; align-items: start; margin: 1.5rem 0; }
.laurel-img { margin-top: 1.5rem; max-width: 320px; }

blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 2px solid var(--dark); }
blockquote p { font-size: 1.1rem; margin-bottom: .25rem; }
blockquote footer { color: var(--muted); font-size: .9rem; }

.credits { margin-top: 2rem; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1.25rem; }
dt { color: var(--muted); }
dd { margin: 0; }

.pager { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .9rem; }
.pager a { text-decoration: none; }
.pager a:hover { text-decoration: underline; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.portrait { margin: 0; }

/* ---------- contact ---------- */
.contact-form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.contact-form label { display: grid; gap: .3rem; font-size: .9rem; color: var(--dark); }
.contact-form .req { color: var(--muted); font-size: .85em; }
.contact-form input, .contact-form textarea { font: inherit; font-size: 1rem; padding: .65em .75em; border: 1px solid #bbb; background: #fff; color: #000; border-radius: 0; width: 100%; }
.contact-form button { justify-self: start; font: inherit; text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; padding: .8em 2em; border: 1px solid var(--dark); background: var(--dark); color: #fff; cursor: pointer; }
.contact-form button:hover { background: #fff; color: var(--dark); }
.contact-form button:disabled { opacity: .5; }
.contact-form .hp { display: none; }

/* ---------- footer ---------- */
.site-footer { padding: 2.5rem 16px; text-align: center; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--dark); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .site-header { flex-direction: column-reverse; align-items: center; text-align: center; padding-top: 1.25rem; padding-bottom: 1.25rem; }
  .site-title { text-align: center; }
  .site-nav ul { justify-content: center; gap: .25rem 1rem; }
  .videos, .split, .about { grid-template-columns: 1fr; }
  .split > a { max-width: 360px; }
  dl { grid-template-columns: 1fr; gap: 0; }
  dd { margin-bottom: .5rem; }
  .pager { flex-direction: column; align-items: center; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .tile-title { transition: none; }
}

/* ---------- the butter list ---------- */
.butter-head { text-align: center; margin-bottom: 2rem; }
.butter-head h1 { margin-bottom: .4rem; }
.butter-head p { color: var(--muted); }
.doc { display: block; width: 100%; height: max(600px, 85vh); border: 1px solid var(--line); background: #fff; }

/* ---------- mouse swarm (drawn by site.js) ---------- */
.swarm { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* ---------- music: clip bank (played through one SoundCloud player, see site.js) ---------- */
.clip-bank { list-style: none; margin: 1.5rem 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.clip {
  display: flex; align-items: center; gap: .9rem; width: 100%; height: 100%; padding: .85rem 1rem;
  font: inherit; text-align: left; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.clip:hover, .clip:focus-visible { border-color: #bbb; }
.clip[aria-pressed="true"] { border-color: var(--dark); box-shadow: 0 0 0 1px var(--dark); }
.clip-icon { flex: none; position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--c, #f7d84a); }
.clip-icon::before { /* play triangle */
  content: ""; position: absolute; left: 15px; top: 12px;
  border-left: 12px solid #222; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.clip.playing .clip-icon::before { /* pause bars */
  left: 13px; top: 12px; width: 4px; height: 14px; border: 0; background: #222; box-shadow: 8px 0 0 #222;
}
.clip.loading .clip-icon { animation: clip-pulse 1s ease-in-out infinite; }
@keyframes clip-pulse { 50% { transform: scale(.85); } }
.clip-text { display: grid; gap: .1rem; min-width: 0; }
.clip-name { color: var(--dark); font-weight: 600; line-height: 1.3; }
.clip-meta { color: var(--muted); font-size: .85rem; }
/* icon colour = the instrument I play in the clip */
.clip[data-instrument="synth"] { --c: #f7d84a; }
.clip[data-instrument="modular"] { --c: #6fd3b0; }
.clip[data-instrument="keys"] { --c: #6cb4ff; }
.clip[data-instrument="zendrum"] { --c: #ff7a6b; }
.clip[data-instrument="guitar"] { --c: #b79cff; }
.clip[data-instrument="stick"] { --c: #ffa8d0; }
.clip[data-instrument="dance"] { --c: #e9e4da; }
/* Music for Dance: one colour per track */
.clip-bank li:nth-child(5n+1) .clip[data-instrument="dance"] { --c: #f7d84a; }
.clip-bank li:nth-child(5n+2) .clip[data-instrument="dance"] { --c: #ff7a6b; }
.clip-bank li:nth-child(5n+3) .clip[data-instrument="dance"] { --c: #6fd3b0; }
.clip-bank li:nth-child(5n+4) .clip[data-instrument="dance"] { --c: #6cb4ff; }
.clip-bank li:nth-child(5n+5) .clip[data-instrument="dance"] { --c: #b79cff; }

/* artwork-only tiles (Earthdance): the image is the button; play/pause shows on hover and while playing */
.art-bank { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.clip.art { position: relative; display: block; padding: 0; overflow: hidden; aspect-ratio: 1; border-radius: 4px; }
.clip.art:not([aria-pressed="true"]) { border-color: transparent; }
.clip.art img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.clip.art:hover img { transform: scale(1.04); }
.clip.art .clip-icon { --c: rgba(255, 255, 255, .92); position: absolute; left: 50%; top: 50%; margin: -19px 0 0 -19px; transition: opacity .2s; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.clip.art.playing .clip-icon { opacity: 0; }
@media (max-width: 700px) { .art-bank { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.clip-player { margin-top: 1rem; }
@media (prefers-reduced-motion: reduce) { .clip.loading .clip-icon { animation: none; } }

/* ---------- music: I.S.O. albums side by side ---------- */
.albums { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.albums img { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 1rem; }
.albums h3 { margin-bottom: .2rem; font-size: 1.3rem; }
.albums h3 .year { color: var(--muted); font-weight: 400; font-size: .75em; margin-left: .3em; }
.albums p { margin-bottom: .4rem; }
@media (max-width: 520px) { .albums { grid-template-columns: 1fr; } }

/* ---------- video covers (see site.js): still image + one round play button ---------- */
.video-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #111; cursor: pointer; }
.video-play img { width: 100%; height: 100%; object-fit: cover; }
.video-play::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%;
  background: rgba(255, 255, 255, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l11-6.5z' fill='%23222'/%3E%3C/svg%3E") center / 22px no-repeat;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .3); transition: transform .2s;
}
.video-play:hover::after, .video-play:focus-visible::after { transform: scale(1.1); }
.videos .video-play::after { width: 40px; height: 40px; margin: -20px 0 0 -20px; background-size: 18px; }
@media (prefers-reduced-motion: reduce) { .video-play::after { transition: none; } }
