/* Latin1 subsets of the github.com/IBM/plex WOFF2 files. The Sans Regular subset also keeps the arrow (U+2192). */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* Borea "Borealis" dark, from ThemeVariant.Dark in src/Borea.App/App.axaml */
:root {
  --bg: #171717;
  --text: #ffffff;
  --text-2: #ababab;
  --accent: #cabcff;
  --on-accent: #000000;
  --line: #3a3a3a;
  --surface: #262626;
  --glow-green: #7cffb0;
  --glow-purple: #9b5cff;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: 24px;
  --section-gap: 64px;
  --column: 880px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

h1,
h2,
p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

/* A link inside a sentence keeps a faint underline, because its color alone is too close to the text around it (WCAG 1.4.1). */
p:not([class]) a,
footer a {
  text-decoration: underline;
  text-decoration-color: rgb(202 188 255 / 0.4);
}

p:not([class]) a:hover,
p:not([class]) a:focus-visible,
footer a:hover,
footer a:focus-visible {
  text-decoration-color: currentColor;
}

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120px var(--gutter) 80px;
  text-align: center;
}

.icon {
  position: relative;
  display: block;
  width: 128px;
  height: 128px;
}

.icon::before {
  content: "";
  position: absolute;
  inset: -32px;
  background: radial-gradient(circle, var(--glow-green), var(--glow-purple) 45%, transparent 70%);
  filter: blur(48px);
  opacity: 0.35;
}

.icon img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

h1 {
  margin-top: 24px;
  color: var(--text);
  font-size: clamp(2.75rem, 8vw, 4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.tagline {
  margin-top: 16px;
  font-size: 1.25rem;
  line-height: 1.4;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
}

.button:hover,
.button:focus-visible {
  text-decoration: none;
}

.button:hover {
  opacity: 0.9;
}

.button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#available {
  margin-top: 32px;
}

.meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.row a {
  color: var(--text-2);
}

.row a:hover,
.row a:focus-visible {
  color: var(--accent);
}

.shot {
  display: block;
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.column {
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section p {
  text-wrap: pretty;
}

@media (min-width: 760px) {
  section {
    display: grid;
    grid-template-columns: 200px 1fr;
    column-gap: 40px;
    align-items: baseline;
  }

  section > :not(h2) {
    grid-column: 2;
  }

  section h2 {
    margin-bottom: 0;
  }
}

section {
  margin-top: var(--section-gap);
}

h2 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.row,
.action {
  margin-top: 16px;
}

footer p {
  margin-top: 48px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
}

/* The share pages of listings */
.top {
  padding-top: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
}

.brand img {
  display: block;
}

.hero.listing {
  padding-top: 56px;
  padding-bottom: 0;
}

.listing-icon {
  width: 128px;
  height: 128px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
}

.listing-icon.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.listing-icon.placeholder img {
  width: 56px;
  height: 56px;
}

/* RFC 0065: an icon that is not square shows its center square. */
.listing-icon:not(.placeholder) img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kind {
  margin-top: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.listing h1 {
  margin-top: 8px;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.by {
  margin-top: 12px;
}

.listing .tagline,
.notice {
  max-width: 640px;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.notice {
  margin-top: 20px;
  padding: 10px 16px;
  border: 1px solid rgb(255 200 80 / 0.4);
  border-radius: 12px;
  background: rgb(255 200 80 / 0.08);
  color: #ffd98a;
}

.notice a {
  color: inherit;
  text-decoration: underline;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.actions .button {
  margin-top: 0;
}

.button.secondary {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
}

.button.secondary:hover {
  opacity: 1;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.hint {
  margin-top: 16px;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
  margin: 0;
}

.facts dt {
  color: var(--text);
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.channel {
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.links li + li {
  margin-top: 8px;
}

.links .meta {
  margin-left: 8px;
}

@media (max-width: 600px) {
  :root {
    --section-gap: 48px;
  }

  .hero {
    padding: 72px var(--gutter) 56px;
  }

  .icon {
    width: 96px;
    height: 96px;
  }

  .tagline {
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  .actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .actions .button {
    justify-content: center;
  }
}

@media (max-width: 399px) {
  :root {
    --gutter: 16px;
  }
}
