* {
  box-sizing: border-box;
}

:root {
  --page: #f6f3ed;
  --ink: #171717;
  --muted: #706d68;
  --line: #d9d4cb;
  --card: #fffdfa;
  --max: 1180px;
  --reading: 760px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  color-scheme: light;
  font-family: var(--sans);
  background: var(--page);
  color: var(--ink);
}

body {
  margin: 0;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

img,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

code {
  color: #9a5c56;
  font-size: 0.98rem;
}

.container,
.container-narrow {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.container-narrow {
  max-width: var(--reading);
}

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

.site-header-inner,
.site-footer-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-brand {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.site-nav a,
.site-footer a {
  text-decoration: none;
}

.site-main {
  min-height: 70vh;
}

.hero,
.archive-header {
  padding-block: clamp(4rem, 9vw, 9rem) 3rem;
}

.hero h1,
.archive-header h1,
.article-header h1 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.035em;
  margin: 0;
}

.hero h1 {
  font-size: clamp(4rem, 12vw, 9rem);
}

.archive-header h1,
.article-header h1 {
  font-size: clamp(3rem, 8vw, 6rem);
}

.hero-copy,
.article-deck {
  max-width: 760px;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  line-height: 1.35;
}

.eyebrow,
.article-card-meta {
  color: var(--muted);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.section {
  padding-block: 2rem 6rem;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-card h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 500;
  line-height: 1.08;
  margin: .6rem 0 1rem;
}

.article-card h2 a {
  text-decoration: none;
}

.article-card p {
  color: #3d3a36;
}

.read-more {
  display: inline-block;
  margin-top: .5rem;
}

.article {
  padding-block: clamp(4rem, 8vw, 8rem);
}

.article-header {
  margin-bottom: 3rem;
}

.article-featured {
  margin: 0 0 3rem;
}

.article-featured img {
  width: 100%;
}

.article-body {
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.8vw, 1.35rem);
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: var(--sans);
  line-height: 1.2;
  margin-top: 2.5em;
}

.article-body img {
  display: block;
  margin: 2rem auto;
}

.article-body pre {
  overflow-x: auto;
  padding: 1rem;
  background: #ebe7df;
  font-size: .9rem;
}

.article-body blockquote {
  margin-inline: 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--ink);
  font-style: italic;
}

.legacy-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-block: 2rem;
}

.taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
}

.taxonomy a {
  border: 1px solid var(--line);
  padding: .25rem .6rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: .85rem;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  margin-top: 2rem;
}

.pagination > :last-child {
  text-align: right;
}

.comments {
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.comments h2 {
  font-size: 1.4rem;
}

.comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: .9rem;
}

.comment-body {
  margin-top: .75rem;
}

.article-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;

  padding: 2rem;
  border-bottom: 1px solid var(--line);

  background: var(--page);

  transition:
    background .25s ease,
    color .25s ease;
}

.article-card:nth-child(even) {
  border-left: 1px solid var(--line);
}


/* Background photo layer */

.article-card::before {
  content: "";
  position: absolute;
  inset: -18px;

  background-image: var(--card-bg);
  background-size: cover;
  background-position: center;

  filter:
    blur(2px)
    saturate(.85)
    contrast(.9)
    brightness(1.02);

  transform: scale(1.06);

  opacity: 0;

  transition:
    filter .35s ease,
    opacity .35s ease,
    transform .35s ease;

  z-index: -2;
}


/* Only cards with images get the photo */

.article-card.has-background::before {
  opacity: .42;
}


/* Soft veil, but ONLY for cards with photos */

.article-card.has-background::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to bottom,
      rgba(246, 243, 237, .45),
      rgba(246, 243, 237, .68)
    );

  z-index: -1;
}


/* On hover: blur the image more */

.article-card.has-background:hover::before {
  filter:
    blur(18px)
    saturate(.7)
    contrast(.85)
    brightness(1.04);

  transform: scale(1.1);
}

.page-container {
  width: min(var(--max), calc(100% - 3rem));
  margin-inline: auto;
  padding-block: 2.5rem;
}

.edit-link {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;

  padding: .6rem 1rem;
  border-radius: .5rem;

  background: #000;
  color: #fff;
  text-decoration: none;
  font: 14px/1 sans-serif;
}

.similar-posts {
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.similar-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.similar-post a {
    color: inherit;
    text-decoration: none;
}

.similar-post img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.similar-post h3 {
    margin: 0 0 .5rem;
}

.similar-post p {
    margin: 0;
}

@media (max-width: 800px) {
    .similar-posts-grid {
        grid-template-columns: 1fr;
    }
}

.article-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;

  padding: 0.22rem 0.55rem;
  border-radius: 999px;

  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;

  border: 1px solid transparent;
  text-decoration: none;
}

.article-tag-featured {
  color: #8f6c2f;
  border-color: #b58a3b;
  background: rgba(181, 138, 59, 0.10);
}

/* Category */
.article-tag-category {
  color: #6b4f2a;
  background: #eee2cf;
  border-color: #dfcfb5;
}

/* Reading time */
.article-tag-ttr {
  color: #35576a;
  background: #e3edf2;
  border-color: #cbdde5;
}

/* Images */
.article-tag-images {
  color: #49623d;
  background: #e6eee1;
  border-color: #cfddc7;
}

/* Normal taxonomy tag */
.article-tag-topic {
  color: #625b69;
  background: #ebe7ed;
  border-color: #d9d2dd;
}

.article-special {
  margin: 2rem 0;
  padding: 1rem 1.25rem;

  border-width: 1px 1px 1px 4px;
  border-style: solid;
  border-radius: 10px;

  font-size: 0.95rem;
  line-height: 1.5;
}

.article-special p {
  margin: 0;
}

.article-special.article-outdated {
  background: #f1e7d8;
  border-color: #dfc9a8;
  border-left-color: #c97a28;
  color: #5f4a32;
}

.article-special.article-outdated strong {
  color: #8f541c;
}

.article-special.article-draft {
  background: #e8f1fa;
  border-color: #bdd3e8;
  border-left-color: #3b82b8;
  color: #294b68;
}

.article-special.article-draft strong {
  color: #256a9e;
}

/* footer */

.site-footer {
  margin-top: 5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer-inner {
  gap: 1rem;
}

.site-footer-copy {
  margin: 0;
}

.site-footer-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  color: inherit;
  text-decoration: none;

  transition:
    color 150ms ease,
    opacity 150ms ease;
}

.site-footer-link:hover {
  color: var(--ink);
}

.site-footer-icon {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.share {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 0.85rem;
    margin-block: 3rem;
    padding-block: 1.5rem;
    border-block: 1px solid var(--line);
    text-align: center;
}

.share__label {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.share__links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.share__link {
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 50%;
    color: var(--ink);
    font-size: 1.35rem;
    text-decoration: none;
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.share__link:hover {
    color: var(--page);
    background-color: var(--ink);
    border-color: var(--ink);
    transform: translateY(-3px);
}

.share__link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* store */

/* Store
-------------------------------------------------- */

.store {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.store-header {
  max-width: 720px;
  margin-bottom: 3rem;
}

.store-header h1 {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1;
}

.store-intro {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}


/* Product grid
-------------------------------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}


/* Product card
-------------------------------------------------- */

.product-card {
  min-width: 0;
}

.product-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.product-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;

  background: #eee9e1;
  border-radius: 12px;

  transition:
    transform 180ms ease,
    filter 180ms ease;
}

.product-card a:hover img {
  transform: translateY(-3px);
  filter: brightness(0.96);
}

.product-card h2 {
  margin: 1rem 0 0.35rem;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.3;
}

.product-card a:hover h2 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.product-price {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}


/* Individual product
-------------------------------------------------- */

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  grid-template-areas:
    "image header"
    "image description"
    "image action";
  gap: 1.5rem 3rem;

  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.product > header {
  grid-area: header;
  align-self: end;
}

.product > header h1 {
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
}

.product > header .product-price {
  color: var(--ink);
  font-size: 1.25rem;
}

.product-cover {
  grid-area: image;
  margin: 0;
}

.product-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: cover;

  background: #eee9e1;
  border-radius: 14px;
}

.product-description {
  grid-area: description;
  color: #403e3a;
  line-height: 1.7;
}

.product-description > :first-child {
  margin-top: 0;
}

.product-description > :last-child {
  margin-bottom: 0;
}


/* Purchase controls
-------------------------------------------------- */

.product-buy {
  grid-area: action;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;

  min-width: 150px;
  padding: 0.8rem 1.25rem;

  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;

  color: var(--card);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;

  transition:
    background 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.product-buy:hover {
  background: transparent;
  color: var(--ink);
  transform: translateY(-1px);
}

.product-buy:focus-visible,
.product-card a:focus-visible {
  outline: 3px solid #c97a28;
  outline-offset: 4px;
}

.product-unavailable {
  grid-area: action;
  justify-self: start;
  margin: 0;
  padding: 0.65rem 1rem;

  background: #f1e7d8;
  border: 1px solid #dfc9a8;
  border-radius: 999px;

  color: #5f4a32;
  font-size: 0.9rem;
}


/* Responsive
-------------------------------------------------- */

@media (max-width: 900px) {
  .product-grid,
  .collections-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "image"
      "description"
      "action";
  }
}

@media (max-width: 560px) {
  .store,
  .product {
    width: min(100% - 1.25rem, 1200px);
    padding-top: 2rem;
  }

  .store-header {
    margin-bottom: 2rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .product-buy {
    width: 100%;
  }
}

.product-card-placeholder {
  display: grid;
  place-items: center;

  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 2rem;

  background: #eee9e1;
  border-radius: 12px;

  color: var(--muted);
  text-align: center;
}

.location-map {
    width: 100%;
    height: 420px;
    margin: 2rem 0;
    overflow: hidden;
    border-radius: 12px;
}

@media (max-width: 720px) {
  .site-header-inner,
  .site-footer-inner,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 1rem;
  }

  .article-list {
    grid-template-columns: 1fr;
  }

  .article-card {
    padding-inline: 1rem;
  }

  .article-card:nth-child(even) {
    border-left: 0;
  }

  .legacy-gallery {
    grid-template-columns: 1fr;
  }
}

/* collections */

.collection-breadcrumbs {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: .9rem;
}

.collection-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.collection-breadcrumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.collections-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.collection-card {
  min-width: 0;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.collection-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.collection-card h2 {
  margin: 1rem 0 .5rem;
  font-size: 1.2rem;
  line-height: 1.25;
}

.collection-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.collection-card h2 a:hover {
  text-decoration: underline;
}

.collection-card p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .collections-list {
    grid-template-columns: 1fr;
  }
}

.article-collections {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.article-collections-label {
  margin: 0 0 .5rem;
  color: var(--muted);
  font-size: .85rem;
}

.article-collections ul {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-collections a {
  color: var(--ink);
  font-weight: 600;
}

.collection-posts {
  margin: 2rem 0;
  padding: 0;
  list-style: none;
  counter-reset: collection-post;
}

.collection-posts li {
  counter-increment: collection-post;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.collection-posts li::before {
  content: counter(collection-post, decimal-leading-zero);
  flex: 0 0 2rem;
  color: var(--muted);
  font-size: .85rem;
}

.collection-posts a {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.collection-posts a:hover {
  text-decoration: underline;
}

.articles-map {
  width: 100%;
  height: min(65vh, 520px);
  min-height: 320px;
  border: 1px solid var(--line, #d9d4cb);
  border-radius: 12px;
  overflow: hidden;
}

.articles-map__link {
  color: var(--ink, #171717);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}

.articles-map__link:hover {
  text-decoration: underline;
}