/* The gallery website's own look, on top of web/epiphany.css: its fonts, the bar above the
   document, the note that introduces it and the footer under it. scripts/site.sh adds the bar, the
   note and the footer around the HTML Typst exports. */

@font-face {
  font-family: 'New Computer Modern Math';
  src: url('fonts/NewCMMath-Regular.woff2') format('woff2');
  font-display: swap;
}

.ep-doc {
  --ep-font-body: 'Hanken Grotesk';
  --ep-font-mono: 'JetBrains Mono';
}

:root {
  --site-ink: light-dark(#1d1f22, #e8e6e1);
  --site-muted: light-dark(#5f646b, #a0a5ad);
  --site-line: light-dark(rgb(29 31 34 / 0.09), rgb(232 230 225 / 0.1));
  --site-accent: light-dark(#1f4e79, #7cb7e0);
  --site-glow: light-dark(rgb(31 78 121 / 0.1), rgb(124 183 224 / 0.12));
  --site-gold: light-dark(#c98a12, #f4c95d);
}

body {
  font-family: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A soft light above the title, the only ornament on the page. */
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: 38rem;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40rem 22rem at 22% -6rem, var(--site-glow), transparent 70%),
    radial-gradient(30rem 18rem at 85% -4rem, color-mix(in srgb, var(--site-gold) 14%, transparent), transparent 70%);
}

/* ---- The bar ---- */
.site-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  /* Edge to edge, across the body's padding (web/epiphany.css), with the links over the
     document's wide band. */
  margin: -1rem -1.25rem 0;
  padding: 0.8rem max(1.25rem, (100% - 62rem) / 2);
  border-bottom: 1px solid var(--site-line);
  background: color-mix(in srgb, light-dark(#fbfaf8, #121417) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  font-size: 0.92rem;
}

.site-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--site-ink);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-mark svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: var(--site-gold);
}

.site-tag {
  color: var(--site-muted);
}

.site-links {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
}

.site-links a {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: var(--site-ink);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.site-links a:hover {
  background: var(--site-line);
}

/* ---- The note above the document ---- */
.site-intro {
  max-width: 44rem;
  margin: 2.5rem auto 0;
}

.site-intro p {
  margin: 0;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--site-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--site-accent) 6%, transparent);
  color: var(--site-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.site-intro strong {
  color: var(--site-ink);
}

.site-intro a,
.site-foot a {
  color: var(--site-accent);
  text-underline-offset: 0.2em;
}

/* ---- The document's title, set larger for a landing page ---- */
.ep-doc .ep-title {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 4.2rem);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.ep-doc .ep-subtitle {
  text-wrap: balance;
}

/* ---- The footer ---- */
.site-foot {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--site-line);
  color: var(--site-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.site-foot p {
  margin: 0 0 0.6rem;
}

.site-fine {
  font-size: 0.8rem;
}

@media (max-width: 40rem) {
  .site-tag {
    display: none;
  }

  .site-intro {
    margin-top: 1.75rem;
  }
}
