/* Side Projectile Studios: homepage */

@font-face {
  font-family: "Gelasio";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/gelasio-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Gelasio";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/gelasio-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Gelasio";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/gelasio-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Gelasio";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/gelasio-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f8f6ef;
  --ink: #252522;
  --line: #43433d;
  --soft: #8d8e85;
  --red: #b43c38;
  --serif: "Gelasio", Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --mono: "Courier New", Courier, monospace;
  color: var(--ink);
  font-family: var(--serif);
  /* Grain sits on the root so it covers the whole viewport, even when the page is shorter than the screen. */
  background: var(--paper) url("assets/img/paper-grain.png");
  scroll-behavior: smooth;
  scrollbar-color: var(--line) var(--paper);
  accent-color: var(--red);
  caret-color: var(--red);
}
* { box-sizing: border-box; }
::selection { background: var(--ink); color: var(--paper); }
body { margin: 0; }
h1, h2, p { margin: 0; }
button, a { font: inherit; color: inherit; }
button { cursor: pointer; }
a { text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
[hidden] { display: none !important; }

.wrap { width: min(100% - clamp(36px, 7vw, 124px), 1570px); margin: auto; }
.skip { position: fixed; z-index: 2; left: 8px; top: -60px; padding: 10px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 6px; }

/* Top bar */
.mast {
  display: flex; align-items: center; justify-content: flex-end;
  min-height: 64px; padding: 8px 0;
  border-bottom: 1.5px solid var(--ink);
}
.mast nav {
  display: flex; align-items: center; gap: clamp(18px, 2.8vw, 44px);
  font: 600 15px/1 var(--sans);
}
.plain { border: 0; background: none; padding: 4px 0; font: inherit; }
.mast nav a { padding: 4px 0; }
.mast nav a:hover, .plain:hover { text-decoration: underline; text-underline-offset: 4px; }

.inkbutton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 11px 19px;
  border: 1.5px solid var(--ink); border-radius: 4px;
  background: var(--ink); color: var(--paper);
  font: 600 14px/1.1 var(--sans);
  transition: background-color .15s;
}
.inkbutton:hover { background: #44453d; }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr);
  gap: clamp(24px, 4vw, 78px); align-items: center;
  padding: clamp(44px, 5.4vw, 88px) 0 clamp(40px, 4.6vw, 72px);
}
.lead { padding-left: clamp(0px, 1vw, 14px); }
/* The display headline: first line roman, second line italic with the red stroke under it. */
.lead h1, .project-lead h1 {
  font-size: clamp(70px, 7.3vw, 122px); line-height: .87;
  letter-spacing: -.05em; font-weight: 700;
}

.lead h1 em, .project-lead h1 em { position: relative; display: inline-block; padding-right: .06em; font-weight: 400; }
.lead h1 em::after, .project-lead h1 em::after {
  content: ""; position: absolute; left: 8%; right: -1%; bottom: -.12em;
  height: .035em; background: var(--red);
  transform: rotate(-3deg); border-radius: 85% 55% 65% 60%;
}
.lead p {
  max-width: 370px; margin: clamp(24px, 2.4vw, 38px) 0 20px;
  font-size: clamp(19px, 1.5vw, 24px); line-height: 1.3; letter-spacing: -.018em;
}

/* The playable logo. The artwork is 2172 x 724; a throw rises about 170 units above it. */
.stage {
  position: relative; display: block; width: 100%; aspect-ratio: 2172 / 724;
  padding: 0; border: 0; background: none;
  cursor: pointer; touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.stage img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
/* The court: one canvas over the whole page, made by site.js. Balls are drawn here and can land anywhere. */
.court { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; }
/* Keyboard focus: one ring around the logo and the room the arc needs above it. */
.stage:focus-visible { outline: none; }
.stage:focus-visible::before {
  content: ""; position: absolute; left: -8px; right: -8px;
  top: calc(-170 / 724 * 100% - 6px); bottom: -8px;
  border: 3px solid var(--red); border-radius: 8px; pointer-events: none;
}

/* Projects */
.projects { scroll-margin: 16px; border-top: 1.5px solid var(--ink); padding-top: 12px; }
.sectionhead {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 0 11px; border-bottom: 1px solid var(--line);
}
.sectionhead h2 { font-size: clamp(34px, 3.4vw, 55px); letter-spacing: -.04em; line-height: 1; }
.sectionhead span { font-size: clamp(16px, 1.4vw, 22px); font-style: italic; }
.covers {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 24px); margin-top: 19px;
}
.cover {
  padding: 0; overflow: hidden;
  border: 1px solid var(--ink); border-radius: 2px; background: transparent;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s cubic-bezier(.2, .8, .2, 1);
}
.cover:hover { transform: translateY(-3px); box-shadow: 2px 4px var(--ink); }
.cover img {
  display: block; width: 100%; height: auto; aspect-ratio: 1.85;
  object-fit: cover; object-position: center 46%;
  border-bottom: 1px solid var(--ink);
}
.cover span {
  display: block; padding: 11px 5px;
  text-transform: uppercase; font-size: clamp(17px, 1.75vw, 29px);
  font-weight: 700; letter-spacing: -.04em;
}

footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 34px 0 0; padding: 16px 0 24px;
  border-top: 1px solid var(--soft);
  font: 13px var(--mono);
}

/* Studio notebook */
dialog {
  position: fixed; width: min(410px, calc(100% - 28px)); max-height: 85dvh; padding: 0;
  border: 1.5px solid var(--ink); border-radius: 5px;
  color: var(--ink); background: var(--paper);
  box-shadow: 5px 7px 0 #24251d30;
}
dialog::backdrop { background: #20221ec2; }
dialog[open] { animation: unfold .15s ease-out; }
.dialogtop {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 16px; border-bottom: 1px solid var(--line);
  font: 13px var(--mono);
}
.dialogtop button {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: none; padding: 5px; font: inherit;
}
.folioart img {
  display: block; width: 100%; height: 145px; object-fit: cover;
  border-bottom: 1px solid var(--line);
}
.dialogbody { padding: 22px; }
.dialogbody h2 { font-size: clamp(29px, 4vw, 40px); line-height: 1; letter-spacing: -.04em; }
.dialogbody p { font-size: 17px; line-height: 1.45; margin-top: 12px; }
.dialogbody .inkbutton { margin-top: 20px; }
.note { margin-top: 18px; padding: 10px 14px 12px; border-left: 2px solid var(--red); background: #b43c3809; }
.note strong { font: 600 12px/1 var(--mono); color: var(--red); text-transform: uppercase; }
.note p { font-style: italic; margin-top: 4px; }
@keyframes unfold { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Inner pages: the logo is a plain link home in the top bar. */
.mast.inner { justify-content: space-between; }
.brand img { display: block; width: clamp(150px, 15vw, 218px); height: auto; }

/* A project's own page */
.project {
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(24px, 4vw, 78px); align-items: center;
  padding: clamp(36px, 4.4vw, 72px) 0 clamp(44px, 5vw, 80px);
}
.app-icon { display: block; width: 84px; height: 84px; margin-bottom: 22px; border: 1px solid var(--ink); border-radius: 4px; }
.tagline { margin-top: clamp(26px, 2.6vw, 40px); font-style: italic; font-size: clamp(16px, 1.4vw, 22px); line-height: 1.3; }
.pitch { margin-top: 14px; font-size: clamp(19px, 1.5vw, 24px); line-height: 1.3; letter-spacing: -.018em; font-weight: 700; }
.about { max-width: 54ch; margin-top: 10px; font-size: 17px; line-height: 1.45; }
.project-art img { display: block; width: 100%; height: auto; border: 1px solid var(--ink); border-radius: 2px; }

.band { border-top: 1.5px solid var(--ink); padding-top: 12px; margin-bottom: clamp(44px, 5vw, 80px); }
.band h3 { margin: 0; font-size: clamp(19px, 1.5vw, 24px); line-height: 1.3; letter-spacing: -.018em; }
.shelves {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px); align-items: start; margin-top: 24px;
}
.plainlist { list-style: none; margin: 10px 0 0; padding: 0; font-size: 17px; line-height: 1.45; }
.plainlist li { padding: 10px 0; border-top: 1px solid var(--soft); }
.split {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  gap: clamp(24px, 4vw, 78px); align-items: start; margin-top: 14px;
}
.split > .plainlist { margin-top: 0; }
.split > .plainlist li:first-child { border-top: 0; }
.contact { padding-top: 10px; }
.contact p { margin: 8px 0 14px; font-size: 17px; line-height: 1.45; }
.contact h3:not(:first-child) { margin-top: 34px; }

/* A page of reading: the title stays at the left, the text runs in one column at the right. */
.reading {
  display: grid; grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr);
  gap: clamp(24px, 4vw, 78px); align-items: start;
  padding: clamp(36px, 4.4vw, 72px) 0 clamp(44px, 5vw, 80px);
}
.reading-head { position: sticky; top: 24px; }
.reading-head h1 { font-size: clamp(34px, 3.4vw, 55px); line-height: 1; letter-spacing: -.04em; text-wrap: balance; }
.reading-head .date { margin-top: 14px; font-style: italic; font-size: clamp(16px, 1.4vw, 22px); line-height: 1.3; }
.backlink {
  display: inline-flex; align-items: center; gap: 9px; padding: 4px 0;
  font: 600 15px/1 var(--sans); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.backlink:hover { color: var(--red); }
.reading-head .backlink { margin-top: 26px; }
.prose { max-width: 68ch; font-size: 17px; line-height: 1.6; }
.prose .intro { font-size: clamp(19px, 1.5vw, 24px); line-height: 1.4; letter-spacing: -.018em; }
.prose h2 {
  margin: 36px 0 0; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: clamp(19px, 1.5vw, 24px); line-height: 1.3; letter-spacing: -.018em;
}
.prose p { margin-top: 10px; }
.prose ul { margin: 10px 0 0; padding-left: 1.15em; }
.prose li { margin-top: 6px; }
.prose li::marker { color: var(--line); }
.reading-foot {
  display: flex; flex-wrap: wrap; gap: 12px 34px; max-width: 68ch; font-size: 17px;
  margin-top: 44px; padding-top: 14px; border-top: 1.5px solid var(--ink);
}

/* Stacked: the logo leads, the headline follows. */
@media (max-width: 900px) {
  .wrap { width: calc(100% - 40px); }
  .mast { min-height: 56px; }
  /* Top padding leaves air for the arc, which rises 7.8% of the logo's width above it. */
  .hero { grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 4vw, 34px); padding: calc(8vw + 18px) 0 34px; }
  .toss { order: -1; }
  .lead {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    column-gap: clamp(16px, 5vw, 56px); align-items: center; padding: 0;
  }
  .lead h1 { grid-row: 1 / 3; font-size: clamp(55px, 12.7vw, 78px); }
  .lead p { align-self: end; margin: 0 0 12px; font-size: clamp(16px, 2.6vw, 22px); }
  .lead .inkbutton { align-self: start; justify-self: start; }
  .project, .split, .reading { grid-template-columns: minmax(0, 1fr); }
  .reading-head { position: static; }
  .project-lead h1 { font-size: clamp(55px, 12.7vw, 78px); }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .mast nav { font-size: 14px; }
  .lead .inkbutton { min-height: 34px; padding: 9px 12px; font-size: 13px; }
  .covers { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .shelves { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .band .sectionhead { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cover img { aspect-ratio: 2.1; }
  .cover span { font-size: 22px; }
  .sectionhead h2 { font-size: 37px; }
  .sectionhead span { font-size: 15px; }
  footer { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
