/* Self-hosted fonts: no requests to Google or any third party */
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
/* Source Serif 4 variable: weight and optical size (8 = text, 60 = display) */
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

/* Layout: one centred composition per screen. The headline is the only
   large element; everything under it is set at reading size. */
:root {
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Outfit", system-ui, sans-serif;
  --dawn: #f6f5ee;      /* page background */
  --ink: #100e08;       /* text, outlines */
  --slate: #5f5d56;     /* secondary text */
  --line: #cfccc0;      /* button outlines */
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--dawn);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Top bar */
.bar {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem);
}

.wordmark,
.bar-link {
  font-size: 1.125rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
}

.bar-link .arrow {
  display: inline-block;
  font-size: 0.875em;
  transition: transform 0.15s ease;
}
.bar-link:hover { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.bar-link:hover .arrow { transform: translate(0.1em, -0.1em); }

/* The stage: everything centred in the space between bar and footer */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vh, 4rem) 1rem;
  text-align: center;
}

/* Measured against the reference: display cut (opsz 52),
   size 4.85vw, line pitch 1.1 */
.headline {
  margin: 0;
  font-weight: 400;
  font-variation-settings: "opsz" 52;
  font-size: max(min(2.75rem, 12.5vw), 4.85vw);
  line-height: 1.1;
}

.sub {
  margin: 1.25rem 0 0;
  font-style: italic;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  color: var(--slate);
  text-wrap: balance;
}

/* Where to listen: four quiet buttons in one row */
.listen { margin-top: clamp(2.25rem, 5vh, 3rem); }

.platforms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 12.5rem);
  justify-content: center;
  gap: 0.75rem;
}

.platform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  height: 100%;
  white-space: nowrap;
  padding: 0.85rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 1.0625rem;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.platform:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--dawn);
}

.affiliation {
  display: block;
  width: auto;
  height: clamp(2.75rem, 3.6vw, 3.5rem);
  max-width: 100%;
  object-fit: contain;
  margin-top: clamp(3rem, 8vh, 5rem);
}

.footer {
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--slate);
}
.footer p { margin: 0; }
.footer p + p {
  margin: 0.35rem auto 0;
  line-height: 1.5;
  text-wrap: balance;
}

/* Narrower screens: an even 2 x 2 grid */
@media (max-width: 56rem) {
  .platforms { grid-template-columns: repeat(2, 12.5rem); }
}
/* Small phones: keep the bar on one line */
@media (max-width: 24rem) {
  .bar { column-gap: 0.75rem; }
  .wordmark,
  .bar-link { font-size: 0.9375rem; }
}

/* Phones: one even column */
@media (max-width: 30rem) {
  .platforms {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 18rem;
    margin-inline: auto;
  }
  .listen { align-self: stretch; }
}

/* Very narrow windows: let button labels wrap rather than overflow */
@media (max-width: 15rem) {
  .platform { white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .platform, .bar-link .arrow { transition: none; }
}
