/* mkrv.in — Makerville Interactive */
:root {
  --indigo-deep: #1A2370;
  --indigo: #232F86;
  --indigo-lift: #303F9F;   /* the original site colour */
  --paper: #FFFFFF;
  --mist: #C8CEF2;
  --signal: #FFC83D;        /* stage-light yellow, used sparingly */
  --ink: #141A4D;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--indigo);
  color: var(--paper);
  font: 1.125rem/1.6 var(--text);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--signal); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(2.75rem, 9vw, 7rem); font-weight: 800; font-variation-settings: "opsz" 96; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.375rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.15rem, 2.2vw, 1.4rem); max-width: var(--measure); color: var(--mist); }

/* Header / footer */
.bar {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 20px var(--gutter);
}
.bar a { text-decoration: none; font-weight: 700; }
.wordmark { font-family: var(--display); font-size: 1.25rem; letter-spacing: -.01em; }
.wordmark span { font-weight: 500; color: var(--mist); }
.foot {
  padding: 48px var(--gutter) 64px; margin-top: 96px;
  background: var(--indigo-deep); color: var(--mist);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
}
.foot p { margin: 0; max-width: var(--measure); }

main > section, .plain, .project, .bar { padding-inline: var(--gutter); max-width: 1280px; margin-inline: auto; }
.foot > * { flex: 0 1 auto; }
.foot { padding-inline: max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter))); }

/* Hero + keyboard: the one loud thing on the site */
.hero { padding-top: clamp(32px, 8vw, 96px); }
.hero h1 { max-width: 11ch; }
.hero .lede { margin-top: 24px; }

.keyboard { position: relative; margin-top: clamp(32px, 6vw, 64px); }
.keys {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(var(--n, 8), 1fr); gap: 4px;
  height: clamp(260px, 38vw, 400px);
}
.key {
  display: flex; align-items: flex-end; justify-content: center;
  height: 100%; padding-bottom: 18px;
  background: var(--paper); color: var(--ink);
  border-radius: 0 0 10px 10px;
  box-shadow: inset 0 -10px 0 #DDE1F6;
  text-decoration: none; font-family: var(--display); font-weight: 700;
  transition: transform .08s ease-out, box-shadow .08s ease-out, background-color .08s;
}
.key span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: clamp(.9rem, 1.6vw, 1.2rem); white-space: nowrap; }
.key:hover, .key:focus-visible, .key.is-down {
  background: var(--signal); color: var(--ink);
  transform: translateY(6px); box-shadow: inset 0 -4px 0 #E0A920;
}
.key:focus-visible { outline-offset: -6px; outline-color: var(--ink); }
.blacks { position: absolute; inset: 0 0 auto 0; height: 58%; pointer-events: none; }
.blacks i {
  position: absolute; top: 0; height: 100%;
  width: calc(100% / var(--n, 8) * .56);
  left: calc(100% / var(--n, 8) * var(--at) - (100% / var(--n, 8) * .28));
  background: var(--indigo-deep); border-radius: 0 0 6px 6px;
  box-shadow: inset 0 -8px 0 #0F1650;
}
.sound {
  margin-top: 16px; font: inherit; font-size: 1rem; color: var(--mist);
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: .2em;
}
.sound[aria-pressed="true"] { color: var(--signal); }

/* Projects grid */
.work, .archive { margin-top: clamp(80px, 12vw, 140px); }
.work h2, .archive h2 { margin-bottom: 32px; }
.work-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 48px 32px;
}
.work-grid a { text-decoration: none; display: block; }
.work-grid img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-radius: 4px; }
.work-grid h3 { margin-top: 16px; }
.work-grid p { color: var(--mist); margin: 6px 0 0; }
.work-grid a:hover h3 { color: var(--signal); }

/* Archive: a quieter list */
.archive-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.archive-list a {
  display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center;
  padding: 12px 0; text-decoration: none; border-top: 1px solid rgba(200, 206, 242, .25);
}
.archive-list img { aspect-ratio: 16 / 9; object-fit: cover; width: 120px; border-radius: 3px; }
.archive-list strong { display: block; font-family: var(--display); font-size: 1.2rem; }
.archive-list span { color: var(--mist); }
.archive-list a:hover strong { color: var(--signal); }
.more { margin-top: 24px; }

/* People */
.people { margin-top: clamp(80px, 12vw, 140px); }
.people-list {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 200px)); gap: 32px 48px;
}
.people-list a, .people-list li > span { text-decoration: none; }
.people-list img, .people-list .initials {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  display: grid; place-items: center;
}
.people-list .initials {
  background: var(--indigo-deep); color: var(--mist);
  font-family: var(--display); font-weight: 800; font-size: clamp(2.5rem, 6vw, 4rem);
}
.people-list .name {
  display: block; margin-top: 16px;
  font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.2;
}
.people-list a .name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.people-list a:hover .name { color: var(--signal); }

/* Call to action */
.cta { margin-top: clamp(80px, 12vw, 140px); }
.cta p { color: var(--mist); max-width: var(--measure); margin-top: 16px; }
.button {
  display: inline-block; margin-top: 8px; padding: 14px 22px;
  background: var(--signal); color: var(--ink); font-weight: 700;
  text-decoration: none; border-radius: 6px;
}
.button:hover { color: var(--ink); background: var(--paper); }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.button, .with-icon { display: inline-flex; align-items: center; gap: .5em; }
.button-wa { background: #25D366; color: #08331A; }
.button-wa:hover { background: var(--paper); color: #08331A; }
.foot p:last-child { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.with-icon:hover .icon { color: var(--signal); }

/* Project pages */
.project { padding-top: clamp(24px, 6vw, 72px); display: grid; gap: 40px; }
.project-media { max-width: 1040px; display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.project-text { max-width: var(--measure); }
.project-text h2 { font-size: 1.375rem; margin-top: 32px; }
.credits { list-style: none; padding: 0; margin: 12px 0 0; }
.credits li { padding: 4px 0; }
.video { margin: 0; }
.video-play, .video iframe {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  background: var(--indigo-deep); border: 0; border-radius: 4px; overflow: hidden;
}
.video-play img { width: 100%; height: 100%; object-fit: cover; }
.play-label {
  position: absolute; left: 16px; bottom: 16px;
  padding: 10px 16px 10px 40px; border-radius: 999px;
  background: var(--signal); color: var(--ink); font-weight: 700; font-size: 1rem;
}
.play-label::before {
  content: ""; position: absolute; left: 18px; top: 50%; translate: 0 -50%;
  border-left: 12px solid var(--ink); border-block: 7px solid transparent;
}
.video-play:hover .play-label { background: var(--paper); }
.video figcaption { margin-top: 10px; color: var(--mist); font-size: 1rem; }
.pager {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  border-top: 1px solid rgba(200, 206, 242, .25); padding-top: 24px; margin-top: 24px;
}

.plain { padding-top: clamp(40px, 10vw, 120px); }
.plain .lede { margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  .key { transition: none; }
}
