/* knowshame.org
   The page starts underwater in the dark, surfaces, and is read in the light.
   Colours and type are set once here; everything below uses these names. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@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;
}

:root {
  --deep: #10262b;       /* the dark water at the top, and the shop */
  --deeper: #0a1a1e;     /* the garments */
  --shallows: #2f5d62;   /* quiet accents on the light */
  --mist: #eef2ec;       /* the light the essay is read in */
  --ink: #16211f;        /* text on the light */
  --lamp: #e9b44c;       /* the one warm thing: links, the button, focus */

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --grotesque: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;

  --edge: clamp(1.25rem, 5vw, 4rem);          /* space at the sides of the page */
  --indent: clamp(0rem, 12vw - 3rem, 14rem);  /* how far the reading column sits in from the left */
  --measure: 34rem;                           /* width of a line of reading text */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

a { color: inherit; text-decoration-line: underline; text-decoration-color: var(--lamp); text-decoration-thickness: 0.12em; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.22em; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 4px; border-radius: 2px; }

/* The reading column: left-aligned, set in from the edge on wide screens. */
.col, .prose, .welcome {
  max-width: calc(var(--measure) + 2 * var(--edge));
  margin-left: var(--indent);
  padding-inline: var(--edge);
}

/* ---------------------------------------------------------------- the dark */

.deep { background: var(--deep); color: var(--mist); }

header.deep { padding-block: var(--edge) 0; }

.banner {
  margin: 0 0 clamp(3rem, 12vh, 8rem);
  padding-inline: var(--edge);
  text-align: right;
  font-family: var(--grotesque);
  font-size: 0.95rem;
  font-weight: 500;
}

.wordmark { margin: 0; padding-inline: var(--edge); margin-left: var(--indent); }
.wordmark svg { display: block; width: min(100%, 58rem); height: auto; }

.epigraph { margin-top: clamp(3rem, 10vh, 6rem); padding-bottom: 1rem; max-width: calc(46rem + 2 * var(--edge)); }
.epigraph .line { display: block; padding-left: 1.5em; text-indent: -1.5em; }
.epigraph blockquote {
  margin: 0;
  font-style: italic;
  font-size: clamp(1.15rem, 0.9rem + 1.2vw, 1.75rem);
  line-height: 1.5;
  color: color-mix(in srgb, var(--mist) 88%, var(--deep));
}
.epigraph blockquote p { margin: 0; }
.epigraph cite {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--grotesque);
  font-style: normal;
  font-size: 1rem;
  font-weight: 500;
  color: var(--lamp);
}

/* Coming up through the water into the light. Purely decorative. */
.surfacing {
  height: clamp(14rem, 55vh, 30rem);
  background: linear-gradient(to bottom,
    var(--deep) 0%,
    #1c3d42 28%,
    var(--shallows) 50%,
    #86aaa4 72%,
    #cfdcd4 88%,
    var(--mist) 100%);
}

/* --------------------------------------------------------------- the light */

.welcome {
  padding-block: 1rem clamp(3rem, 9vh, 6rem);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  line-height: 1.3;
}
.welcome p { margin: 0 0 0.7em; text-wrap: balance; }
.welcome p:last-child { margin-bottom: 0; }

.prose { padding-bottom: clamp(3rem, 8vh, 5rem); }
.prose p { margin: 0 0 1.15em; }
.prose h2, .prose h3 {
  font-family: var(--grotesque);
  font-stretch: 85%;
  line-height: 1.05;
  text-wrap: balance;
}
.prose h2 {
  /* headings may run wider than the reading text */
  width: min(100vw - var(--indent) - 2 * var(--edge), 46rem);
  margin: clamp(3.5rem, 10vh, 6rem) 0 1.5rem;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.prose > h2:first-child { margin-top: 0; }
.prose h3 {
  margin: 2.5rem 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}
.prose h2 + h3 { margin-top: 0; }
.prose h3 em, .prose h3 i { font-style: normal; color: var(--shallows); }
.prose img { max-width: 100%; height: auto; }

.prose blockquote {
  margin: 2rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--shallows);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.4;
}
.prose blockquote p { margin: 0; }
.prose cite {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--grotesque);
  font-style: normal;
  font-size: 1rem;
  font-weight: 500;
  color: var(--shallows);
}

/* The prayer. The one loud thing on the page: it breaks out of the column,
   edge to edge, back in the dark. */
.prose blockquote.shout {
  width: 100vw;
  margin: clamp(3rem, 8vh, 5rem) 0;
  margin-left: calc(-1 * (var(--indent) + var(--edge)));
  padding: clamp(3rem, 9vw, 7rem) var(--edge) clamp(3rem, 9vw, 7rem) calc(var(--indent) + var(--edge));
  border: 0;
  background: var(--deep);
  color: var(--mist);
  font-family: var(--grotesque);
  font-style: normal;
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(3.25rem, 1rem + 11.5vw, 12rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.prose blockquote.shout .line { display: block; }

/* ---------------------------------------------------------------- the shop */

.shop { padding-block: clamp(4rem, 12vh, 8rem); }
.shop-inner { margin-left: var(--indent); padding-inline: var(--edge); max-width: 64rem; }
.shop h2 {
  margin: 0;
  font-family: var(--grotesque);
  font-stretch: 85%;
  font-weight: 700;
  font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.shop .subtitle { margin: 1rem 0 0; font-size: 1.3rem; color: color-mix(in srgb, var(--mist) 80%, var(--deep)); }

.garments {
  list-style: none;
  margin: clamp(2.5rem, 6vh, 4rem) 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.25rem;
}
.garments a { display: block; text-decoration: none; }
/* Each tile is the front of the garment: black cloth, the print on the chest. */
.print {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  aspect-ratio: 5 / 3;   /* wide on a phone, where the tiles stack */
  padding: 12%;
  background: var(--deeper);
  border-radius: 6px;
  text-align: center;
  outline: 2px solid transparent;
  outline-offset: -2px;
  transition: outline-color 0.15s;
}
@media (min-width: 34rem) { .print { aspect-ratio: 4 / 5; } }
.garments a:hover .print, .garments a:focus-visible .print { outline-color: var(--lamp); }
.garments a:focus-visible { outline: none; }
.print-big {
  font-family: var(--grotesque);
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(2.25rem, 1.5rem + 2.2vw, 3.5rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
}
.print-small { font-style: italic; font-size: 1.15rem; color: var(--lamp); }
.print-logo svg { width: 100%; height: auto; }
.garment-label {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--grotesque);
  font-size: 0.95rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--mist) 75%, var(--deep));
}

.shop-more p { margin: 0 0 1.5rem; max-width: var(--measure); }
.shop-action { margin: 0 0 1rem; }
.price-note { margin: 0; font-family: var(--grotesque); font-size: 0.95rem; color: color-mix(in srgb, var(--mist) 70%, var(--deep)); }

.button {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  background: var(--lamp);
  color: var(--deep);
  border-radius: 4px;
  font-family: var(--grotesque);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}
.button:hover { background: #f3c768; }

/* ------------------------------------------------- sections after the shop */

.plain { padding-top: clamp(4rem, 12vh, 8rem); }

.signoff { padding: 0 var(--edge) clamp(3rem, 8vh, 5rem); margin-left: var(--indent); color: var(--shallows); }
.signoff svg { display: block; width: 11rem; height: auto; }

/* ---------------------------------------------------------- page not found */

.lost { background: var(--deep); color: var(--mist); }
.lost-inner { min-height: 100vh; padding: var(--edge); margin-left: var(--indent); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1rem; }
.lost-inner .wordmark { margin: 0 0 2rem; padding: 0; width: 100%; }
.lost-inner .wordmark a { display: block; }
.lost-inner h1 { margin: 0; font-family: var(--grotesque); font-stretch: 85%; font-weight: 700; font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); line-height: 1; }
.lost-inner p { margin: 0; }
