/* Shared styles for every rawpositive.com page. */

:root {
  --bg: #141414;
  --fg: #ebebeb;
  --body: rgba(235, 235, 235, 0.8);
  --muted: rgba(235, 235, 235, 0.6);
  --faint: rgba(235, 235, 235, 0.5);
  --rule: rgba(235, 235, 235, 0.14);
  --rust: #a64221;
  --header: 76px;
  --gutter: 32px;
  --wide: 1200px;
  --text: 680px;
  color-scheme: dark;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 1.0625rem;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
strong {
  color: var(--fg);
}

h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

a:hover,
a:focus-visible {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--rust);
}

[id] {
  scroll-margin-top: calc(var(--header) + 24px);
}

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

.prose {
  max-width: calc(var(--text) + 2 * var(--gutter));
}

/* Header: always on screen. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .mark img {
  width: auto;
  height: 46px;
}

.site-header .mark:hover,
.site-header .mark:focus-visible {
  text-decoration: none;
}

/* Small caps nav, set like the wordmark; thin rules stand in for the "|". */

.links {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.links li + li::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin: 0 1.1em;
  vertical-align: -0.1em;
  background: var(--rule);
}

.site-header .links a {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-header .links a[aria-current="page"] {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--rust);
  text-decoration-thickness: 2px;
}

/* Fill at least the first screen so the footer only shows after scrolling. */

main {
  min-height: calc(100vh - var(--header) - 1px);
  min-height: calc(100svh - var(--header) - 1px);
  padding-bottom: 6rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.75rem 0 2.5rem;
  font-size: 0.8125rem;
  color: var(--faint);
}

.site-footer .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer .links {
  order: 2;
}

.site-footer .instagram img {
  width: 18px;
  height: 18px;
  opacity: 0.6;
}

.site-footer .instagram:hover img,
.site-footer .instagram:focus-visible img {
  opacity: 1;
}

.site-footer .legal {
  margin: 1.25rem 0 0;
  max-width: 60ch;
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--faint);
}

/* Page heading block shared by inner pages. */

.page-head {
  padding: 4.5rem 0 1rem;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.01em;
}

.page-head p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

/* Section label: a rust spacer bar, then letterspaced caps. */

.label {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
}

.label::before {
  content: "";
  flex: none;
  width: 5px;
  height: 1.35em;
  background: var(--rust);
}

/* A print in a frame, flanked by the logo's rust spacer bars. */

.frame {
  position: relative;
  margin: 0 18px;
  border: 3px solid var(--fg);
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  top: 4%;
  bottom: 4%;
  width: 6px;
  background: var(--rust);
}

.frame::before {
  left: -18px;
}

.frame::after {
  right: -18px;
}

.frame img {
  width: 100%;
}

.prose h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.3rem;
}

.prose p,
.prose ul {
  margin: 0 0 1rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.3rem;
}

@media (max-width: 640px) {
  :root {
    --header: 64px;
    --gutter: 16px;
  }

  body {
    font-size: 1rem;
  }

  .site-header .mark img {
    height: 38px;
  }

  .site-header .links a {
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
  }

  .links li + li::before {
    margin: 0 0.6em;
  }

  .label {
    font-size: 0.9375rem;
  }

  .site-footer .row {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer .links {
    order: 0;
  }

  .page-head {
    padding-top: 3rem;
  }

  .frame {
    margin: 0 12px;
  }

  .frame::before {
    left: -12px;
  }

  .frame::after {
    right: -12px;
  }

  .frame::before,
  .frame::after {
    width: 5px;
  }
}

.site-header .links li {
  white-space: nowrap;
}

/* Inner pages carry a fourth link (Home), so tighten the nav on phones. */
@media (max-width: 480px) {
  .site-header .mark img {
    height: 32px;
  }

  .site-header .links a {
    font-size: 0.71875rem;
    letter-spacing: 0.05em;
  }

  .links li + li::before {
    margin: 0 0.5em;
  }
}

@media (max-width: 374px) {
  .site-header .links a {
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
  }

  .links li + li::before {
    margin: 0 0.4em;
  }
}

@media (max-width: 339px) {
  .site-header .mark img {
    height: 28px;
  }

  .site-header .links a {
    font-size: 0.625rem;
    letter-spacing: 0;
  }

  .links li + li::before {
    margin: 0 0.35em;
  }
}
