/* Atkinson Hyperlegible, Braille Institute of America, SIL OFL.
   Fraunces, SIL OFL. License texts live next to the font files. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Fraunces;
  src: url("../fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f3efe6;
  --paper-deep: #e7e0d2;
  --card: #fbf9f4;
  --ink: #1c2420;
  --muted: #3e4c45;
  --line: #ddd4c4;
  --pine: #1e3a2f;
  --pine-hover: #2a5141;
  --focus: #1e3a2f;
}

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

html {
  background: var(--paper);
  font-size: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.55;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

h1, h2, h3 {
  font-family: Fraunces, Georgia, "Iowan Old Style", serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

a {
  color: var(--pine);
}

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: var(--pine);
  color: #f6f1e7;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--pine);
  color: #f6f1e7;
  padding: 0.55rem 0.9rem;
  z-index: 5;
}

.skip:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(1080px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner,
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.header-inner {
  padding: 0.95rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-name {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.mark {
  color: var(--pine);
  flex: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.nav a,
.site-footer a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  text-decoration-color: #b7c4bb;
}

.nav a[aria-current="page"] {
  text-decoration-color: currentColor;
}

.hero {
  padding: 2.6rem 0 0.4rem;
}

.hero h1,
.about h1,
.product h1 {
  margin: 0.35rem 0 0.75rem;
}

.hero h1 {
  max-width: 16ch;
  font-size: clamp(2.35rem, 6vw, 3.8rem);
  line-height: 1.02;
}

.kicker {
  margin: 0;
  color: var(--pine);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lede,
.pitch {
  font-size: 1.22rem;
  line-height: 1.45;
  max-width: 38rem;
}

.lede {
  margin: 0;
  color: var(--ink);
}

.catalog {
  margin-top: 2.75rem;
  scroll-margin-top: 1rem;
}

.section-head {
  margin-bottom: 1rem;
  max-width: 38rem;
}

.section-head h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  min-height: 100%;
}

.card:hover,
.card:focus-visible {
  border-color: var(--pine);
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  background: var(--paper-deep);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  padding: 0.95rem 1rem 1.1rem;
}

.card p {
  margin: 0;
}

.card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.card:hover h3,
.card:focus-visible h3 {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.card-pitch {
  color: var(--muted);
}

.card-action {
  margin-top: auto;
  padding-top: 0.55rem;
  font-weight: 700;
  color: var(--pine);
}

.empty {
  margin-top: 2rem;
}

.product {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding-top: 1.6rem;
  padding-bottom: 1rem;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 1rem;
}

.crumbs a {
  color: var(--pine);
}

.product h1 {
  font-size: clamp(1.85rem, 4vw, 2.7rem);
}

.pitch {
  margin: 0;
}

.product-photo img {
  width: 100%;
  border-radius: 18px;
  background: var(--paper-deep);
}

.formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.formats li {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

.prose {
  max-width: 40rem;
}

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

.product h2,
.about h1 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.product h2 {
  margin: 0.4rem 0 0.5rem;
  font-size: 1.45rem;
}

.highlights {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
}

.highlights li {
  margin: 0.4rem 0;
}

.highlights li::marker {
  color: var(--pine);
}

.buy-row {
  margin: 0 0 0.7rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  background: var(--pine);
  color: #f6f1e7;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--pine-hover);
}

.button:visited {
  color: #f6f1e7;
}

.note {
  margin: 0;
  color: var(--muted);
  max-width: 36rem;
}

.about {
  padding-top: 2.4rem;
  padding-bottom: 1rem;
}

.site-footer {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
}

.footer-inner {
  padding: 1.4rem 0 2.2rem;
  align-items: flex-start;
}

.site-footer p {
  margin: 0;
  max-width: 28rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}

#content:focus {
  outline: none;
}

@media (min-width: 700px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }

  .button {
    width: auto;
    min-width: 220px;
  }
}

@media (min-width: 980px) {
  .grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .product {
    grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
    grid-template-areas:
      "photo intro"
      "photo details";
    column-gap: 3rem;
    align-items: start;
  }

  .product-photo {
    grid-area: photo;
    position: sticky;
    top: 1.25rem;
  }

  .product-intro {
    grid-area: intro;
  }

  .product-details {
    grid-area: details;
  }
}

@media (forced-colors: active) {
  .button {
    border: 1px solid ButtonText;
  }
}
