/* johnhboyer.com — a name, and four record sleeves. */

:root {
  --bg: #FFFFFF;
  --ink: #161616;
  --muted: #6B6B6B;
  --line: #E4E4E4;
  --accent: #D9261C;

  --display: 'Sofia Sans Extra Condensed', 'Arial Narrow', 'Helvetica Neue', Impact, sans-serif;
  --body: 'Sofia Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --pad: clamp(16px, 4vw, 56px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --ink: #F2EFE8;
    --muted: #9A9892;
    --line: #3A3A3A;
    --accent: #FF3B2E;
  }
}
:root[data-theme="dark"] {
  --bg: #121212;
  --ink: #F2EFE8;
  --muted: #9A9892;
  --line: #3A3A3A;
  --accent: #FF3B2E;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

h1, h2, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

/* the one utility voice */
.top, .topnav, .elsewhere, .wall-head, .foot, .status {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---- top ---- */
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px var(--pad);
  color: var(--muted);
}
.topnav { display: flex; gap: 28px; }

/* ---- hero ---- */
.hero { padding: 8px var(--pad) 80px; }
.name {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(64px, 20.5vw, 350px);
  line-height: 0.82;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-left: -0.03em;
}
.hero-row {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  margin-top: 44px;
}
.photo { width: 260px; }
.photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 50%;
}
.bio p {
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.45;
  max-width: 70ch;
  text-wrap: pretty;
}
.bio p + p { margin-top: 0.9em; }
.elsewhere {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 28px;
  color: var(--muted);
}

/* ---- explainer ---- */
.intro {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  padding: 0 var(--pad) 72px;
}
.intro .wall-head { padding: 4px 0 0; }
.intro p {
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.45;
  max-width: 70ch;
  text-wrap: pretty;
}

/* ---- section heads ---- */
.wall { padding: 0 var(--pad); }
.wall-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 0 0 18px;
  color: var(--muted);
}
.wall-head h2 {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: var(--ink);
}
.wall-head p { text-align: right; }

/* ---- the records ---- */
.covers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}
.record {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
}
.record:hover { color: var(--ink); }
.cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  transition: opacity 300ms ease;
}
.record:hover .cover, .record:focus-visible .cover { opacity: 0.92; }
.c-title { font-family: var(--body); font-size: 22px; font-weight: 500; letter-spacing: 0.04em; opacity: 0.8; }

.caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 24px;
  align-items: baseline;
}
.cap-title {
  font-family: var(--body);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
}
.cap-title::after {
  content: "→";
  margin-left: 10px;
  font-family: var(--body);
  font-weight: 400;
  opacity: 0;
  transition: opacity 200ms ease;
}
.record:hover .cap-title::after { opacity: 1; }
.cap-sub {
  grid-column: 1 / -1;
  color: var(--muted);
  max-width: 52ch;
  text-wrap: pretty;
}

/* ---- coming soon: a quiet list ---- */
.wall--soon { padding-top: 72px; }
.soon-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: clamp(17px, 1.3vw, 19px);
}
.soon-list li:last-child { border-bottom: 1px solid var(--line); }
.status { color: var(--muted); white-space: nowrap; }

/* ---- about, at the foot ---- */
.wall--about { padding-top: 72px; }
.wall--about p {
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.45;
  max-width: 70ch;
  text-wrap: pretty;
}

/* ---- footer ---- */
.foot {
  display: flex;
  justify-content: space-between;
  padding: 72px var(--pad) 48px;
  color: var(--muted);
}

/* ---- narrow ---- */
@media (max-width: 860px) {
  .hero-row, .intro { grid-template-columns: minmax(0, 1fr); }
  .intro { gap: 12px; }
  .wall-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .wall-head p { text-align: left; }
  .covers { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .soon-list li { flex-direction: column; gap: 4px; }
  .photo { width: 160px; }
  .topnav { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .cover, .cap-title::after { transition: none; }
}

/* ---- the cards: the site itself, printed on coloured stock ---- */

:root {
  /* each reader's own accent, from its stylesheet */
  --stock-plato: #1f6f7a;
  --stock-aristotle: #7a4e2d;
  --stock-homer: #6E1F3A;
  --stock-grammata: #a12c21;
}

.covers--b { gap: 40px; }

.card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--stock);
  color: #F2ECE0;
}
.card--plato     { --stock: var(--stock-plato); }
.card--aristotle { --stock: var(--stock-aristotle); }
.card--homer     { --stock: var(--stock-homer); }
.card--grammata  { --stock: var(--stock-grammata); }

.card-title {
  position: absolute;
  left: 6.5%; top: 7%; right: 6.5%;
  font-weight: 600;
  font-size: clamp(28px, 3.1vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  z-index: 3;
}

/* what it does, in the margin beside the print */
.card-list {
  position: absolute;
  left: 6.5%; top: 31%;
  width: 24%;
  font-size: clamp(12px, 0.95vw, 14px);
  line-height: 1.3;
  z-index: 3;
}
.card-list li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 9px;
  text-wrap: pretty;
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 1px;
  background: currentColor;
}

/* the site, bleeding off the bottom right */
.shot {
  position: absolute;
  left: 36%; top: 31%;
  width: 90%;
  aspect-ratio: 1280 / 860;
  background: #EFEDE8;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35), 0 24px 48px -16px rgba(0,0,0,0.5);
  transition: transform 300ms ease;
  z-index: 2;
}
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 0 0; }
.record:hover .shot { transform: translate(-6px, -6px); }

.go {
  position: absolute;
  left: 6.5%; bottom: 6.5%;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 12px 6px 0;
  background: var(--stock);
  box-shadow: 0 0 0 6px var(--stock);
  z-index: 3;
}
.go::before {
  content: "";
  position: absolute; left: 0; right: 12px; bottom: 3px;
  height: 1px; background: currentColor;
}
.go::after { content: "→"; transition: transform 200ms ease; }
.record:hover .go::after { transform: translateX(4px); }

.grain {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.18; pointer-events: none; z-index: 4;
  mix-blend-mode: multiply;
}

@media (max-width: 860px) {
  .card-list { display: none; }
  .shot { left: 12%; top: 30%; width: 110%; }
}
@media (prefers-reduced-motion: reduce) {
  .shot, .go::after { transition: none; }
}
