:root {
  --page: #e7e5e1;
  --card: #f9f4ee;
  --ink: #100f0d;
  --muted: #6f6a64;
  --accent: #fa053f;
  --accent-deep: #c8042f;
  --rule: #e7e3dc;
  --tile: #f9f4ee;
  --measure: 42rem;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--card);
  color: var(--ink);
  font-family: "Crimson Pro", Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.sheet {
  width: 100%;
  margin: 0 auto;
  background: var(--card);
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6.5rem) clamp(1.5rem, 5vw, 4rem) clamp(3.5rem, 6vw, 5.5rem);
}

/* ---- Masthead ---- */
.site-header {
  max-width: var(--measure);
  margin: 0 auto clamp(3rem, 6vw, 4.5rem);
  text-align: left;
}

.site-header h1 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.02;
  text-transform: lowercase;
}

.lede {
  margin: 1.15rem 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.42;
  text-align: left;
}

.lede:first-of-type {
  margin-top: 0;
}

/* Deemphasized byline (title after the body) */
.byline {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin: 2.4rem 0 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.byline-title,
.byline-meta {
  flex: none;
}

.byline-rule {
  display: inline-block;
  width: 3.4rem;
  height: 1px;
  background: currentColor;
  opacity: 0.85;
}

.byline-meta {
  font-weight: 600;
}

/* ---- Color box (callout) ---- */
.callout {
  margin: 1.8rem 0 0;
  padding: clamp(1.3rem, 3.2vw, 2.1rem) clamp(1.4rem, 4vw, 2.4rem);
  border-radius: 2px;
  text-align: left;
}

.callout .lede {
  margin: 0;
  color: inherit;
  font-size: 1.3rem;
  line-height: 1.42;
}

.callout .lede + .lede {
  margin-top: 1rem;
}

.callout--green {
  background: #d3e7c6;
  color: #2e5a36;
}

.callout--blue {
  background: #d4ebef;
  color: #1f4a5e;
}

.callout--pink {
  background: #f6e2d8;
  color: #8a4a36;
}

/* ---- Category section ---- */
.category-section--beautiful-books {
  --tile: #e8e8e6;
}

.category-section--beautiful-books .gift-image {
  mix-blend-mode: normal;
}

.category-section {
  margin-bottom: clamp(4rem, 7vw, 6rem);
}

.category-section:last-child {
  margin-bottom: 0;
}

.category-heading {
  margin-bottom: 1.8rem;
  text-align: center;
}

.category-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: var(--accent);
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.05;
  text-transform: lowercase;
  white-space: nowrap;
}

.category-heading h2::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(0.08em);
}

/* ---- Gift grid ---- */
.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: clamp(1.1rem, 2vw, 1.75rem);
}

.gift-grid--single {
  grid-template-columns: minmax(15rem, 19rem);
}

.gift-grid--single:has(.gift--gallery),
.gift-grid--single:has(.gift--icon-gallery) {
  grid-template-columns: 1fr;
}

.gift {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gift-image-link {
  display: block;
  background: var(--tile);
  overflow: hidden;
}

.gift-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 0.4rem;
  mix-blend-mode: multiply;
}

.gift-image-placeholder {
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
  letter-spacing: 0.02em;
  text-decoration: none;
}

/* ---- Galleries ---- */
.gift-image-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  padding: 0.6rem;
}

.gift-image-gallery .gift-image {
  padding: 0.35rem;
}

.gift:not(.gift--gallery):not(.gift--icon-gallery) .gift-image-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  aspect-ratio: 1 / 1;
  padding: 0.6rem;
}

.gift-image-item {
  display: block;
}

.gift--gallery {
  grid-column: 1 / -1;
}

.gift--gallery .gift-image-gallery {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0 0.85rem 0.85rem;
}

.gift--gallery .gift-image {
  aspect-ratio: 4 / 5;
}

.gift--icon-gallery {
  grid-column: 1 / -1;
}

.gift--icon-gallery .gift-image-gallery {
  grid-template-columns: repeat(auto-fit, minmax(5.4rem, 1fr));
  gap: 0.5rem;
  padding: 0.85rem;
}

.gift--icon-gallery .gift-image {
  aspect-ratio: 1;
  padding: 0.2rem;
}

/* ---- Gift body ---- */
.gift-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem 1rem;
  padding: 0.95rem 0.15rem 0;
}

.gift--gallery .gift-body,
.gift--icon-gallery .gift-body {
  max-width: var(--measure);
}

.gift h3 {
  margin: 0 0 0.1rem;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.18;
}

.gift h3 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 160ms ease;
}

.gift h3::after {
  content: "→";
  display: block;
  margin-top: 0.28rem;
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  opacity: 0;
  transform: translateX(-0.15rem);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.gift:hover h3 a,
.gift:focus-within h3 a,
.gift--selected h3 a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.gift:hover h3::after,
.gift:focus-within h3::after,
.gift--selected h3::after {
  opacity: 1;
  transform: translateX(0);
}

.maker {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.25;
}

.maker a {
  color: inherit;
}

.price {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  transition: color 160ms ease;
  white-space: nowrap;
}

.gift:hover .price,
.gift:focus-within .price,
.gift--selected .price {
  color: var(--accent);
}

.note {
  grid-column: 1 / -1;
  margin: 0.45rem 0 0;
  color: #322e2a;
  font-size: 0.98rem;
  line-height: 1.34;
}

.gift-quote {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0;
  padding-left: 0.85rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.32;
  transition: border-color 160ms ease;
}

.gift:hover .gift-quote,
.gift:focus-within .gift-quote,
.gift--selected .gift-quote {
  border-left-color: var(--accent);
}

/* ---- Footer ---- */
.site-footer {
  max-width: var(--measure);
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}

.site-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(111, 106, 100, 0.4);
  text-underline-offset: 0.16em;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

@media (max-width: 640px) {
  .gift-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 0.9rem;
  }

  .gift-grid--single {
    grid-template-columns: minmax(0, 14rem);
  }

  .gift-body {
    grid-template-columns: 1fr;
  }

  .price {
    margin-top: 0.1rem;
  }
}
