/* Hearthday Paper Co. | one stylesheet, mobile first.
   Palette is taken from the Zazzle store's own logo and banner: cream paper, leaf green, heart terracotta. */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-var.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  --cream: #f8efde;        /* banner paper */
  --bg: #fbf6ec;
  --paper: #fffdf8;
  --ivory: #f2ece1;        /* logo tile */
  --ink: #1d2e21;          /* logo line work */
  --text: #2b2f27;
  --muted: #5b5a4c;
  --forest: #2f4a36;
  --forest-2: #3e6047;
  --leaf: #8fa58a;
  --sage: #e6ebdc;
  --terracotta: #a94e2c;   /* the heart */
  --rule: #e4d8c2;
  --shadow: 0 1px 2px rgba(29, 46, 33, .06), 0 6px 18px rgba(29, 46, 33, .08);
  --radius: 14px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--sans); overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-underline-offset: 2px; }
a:hover { color: var(--terracotta); }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.15; font-weight: 650; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
/* .vh needs a positioned ancestor, or it escapes scroll containers and widens the page on phones */
.book, .tile a, .shelf, .chips, .site-foot, .signup-card { position: relative; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--forest); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- header ---------- */
.site-head { background: var(--paper); border-bottom: 1px solid var(--rule); z-index: 20; }
@media (min-width: 560px) { .site-head { position: sticky; top: 0; } }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 10px; }
.brand-name { font-family: var(--serif); font-weight: 650; font-size: 1.2rem; line-height: 1.05; }
.brand-name span { font-style: italic; font-weight: 400; color: var(--terracotta); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a { display: block; padding: 8px 10px; border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem; }
.site-nav a:hover { background: var(--sage); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--forest); color: #fff; }
@media (max-width: 559px) {
  .head-row { padding-block: 8px; }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: space-between; }
  .site-nav a { padding: 6px 9px; font-size: .92rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--forest); color: #fff; border: 2px solid var(--forest);
  padding: 10px 18px; border-radius: 999px; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--forest-2); border-color: var(--forest-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--forest); }
.btn-ghost:hover { background: var(--sage); color: var(--ink); border-color: var(--forest); }
.btn-buy { background: var(--terracotta); border-color: var(--terracotta); font-size: .95rem; padding: 9px 16px; }
.btn-buy:hover { background: #8f3f22; border-color: #8f3f22; }

/* ---------- hero: banner strip + overlapping logo tile, like the Zazzle storefront ---------- */
.hero { background: var(--cream); border-bottom: 1px solid var(--rule); }
.hero-banner img { width: 100%; height: auto; }
@media (min-width: 700px) {
  .hero-banner img { height: clamp(210px, 27.6vw, 420px); object-fit: cover; object-position: right 55%; }
}
.hero-body { display: grid; gap: 22px; padding-bottom: 30px; }
.hero-logo { width: 96px; height: 96px; border-radius: 18px; border: 4px solid var(--paper); box-shadow: var(--shadow); margin: -52px 0 14px; position: relative; }
.hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); max-width: 16em; }
.hero-lede { font-size: 1.06rem; max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.hero-shops { display: grid; gap: 14px; align-content: end; }
@media (min-width: 900px) {
  .hero-body { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 44px; align-items: end; padding-bottom: 40px; }
  .hero-logo { width: 120px; height: 120px; margin-top: -70px; }
}
.shop-card {
  display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px;
  text-decoration: none; color: var(--text); box-shadow: var(--shadow);
}
.shop-card:hover { border-color: var(--leaf); color: var(--text); }
.shop-n { grid-row: span 2; font: 650 2.3rem/1 var(--serif); color: var(--terracotta); min-width: 2.2ch; text-align: center; }
.shop-t { font: 650 1.15rem/1.2 var(--serif); color: var(--ink); }
.shop-d { color: var(--muted); font-size: .93rem; line-height: 1.45; }

/* ---------- seasonal shelves ---------- */
.season { padding-block: 36px 12px; }
.season-head { max-width: 46em; }
.season-head h2 { display: flex; align-items: center; gap: 12px; }
.season-head h2::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.season-head p { color: var(--muted); }
.shelf-label { font-family: var(--sans); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; display: flex; gap: 12px; align-items: baseline; }
.shelf-label a { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .95rem; }
.shelf { list-style: none; margin: 0; padding: 0 0 10px; display: grid; gap: 14px;
  grid-auto-flow: column; grid-auto-columns: minmax(150px, 44%); overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.shelf > * { scroll-snap-align: start; }
@media (min-width: 700px) { .shelf { grid-auto-columns: minmax(170px, 30%); } }
@media (min-width: 1000px) {
  .shelf { grid-auto-flow: row; overflow: visible; }
  .shelf-books { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .shelf-gifts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.shelf .book-desc { display: none; }
@media (max-width: 699px) { .shelf .book-sub { display: none; } }

/* ---------- book cards ---------- */
.book-grid { display: grid; gap: 22px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; } }
@media (min-width: 1000px) { .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .book-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.book { display: flex; flex-direction: column; min-width: 0; }
.book[hidden] { display: none; }
.book-cover { display: block; position: relative; aspect-ratio: 5 / 7; border-radius: 10px;
  background: linear-gradient(180deg, transparent 62%, rgba(143, 165, 138, .2)); }
.book-cover img { position: absolute; left: 8%; top: 5%; width: 84%; height: 90%; object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)) drop-shadow(0 8px 10px rgba(29,46,33,.2)); transition: transform .2s ease; }
.book-cover:hover img { transform: translateY(-3px); }
.book-body { display: flex; flex-direction: column; flex: 1; padding-top: 10px; }
.book-format { font-size: .8rem; font-weight: 600; color: var(--terracotta); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .25em; }
.book-format .price { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 600; }
.book-title { font-size: 1.08rem; margin-bottom: .2em; }
.book-sub { font-size: .88rem; color: var(--muted); line-height: 1.4; margin-bottom: .5em; }
.book-desc { font-size: .92rem; line-height: 1.5; }
.book .btn-buy { margin-top: auto; align-self: flex-start; }
@media (max-width: 459px) { .book-desc { display: none; } .book .btn-buy { width: 100%; } }

/* ---------- gift tiles (Zazzle-style square grid) ---------- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tile[hidden] { display: none; }
.tile a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); height: 100%; }
.tile-img { display: block; aspect-ratio: 1; background: #fff; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.tile a:hover .tile-img img { transform: scale(1.04); }
.tile a:hover .tile-name { color: var(--terracotta); text-decoration: underline; }
.tile-name { font-weight: 600; font-size: .92rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.tile-kind { font-size: .8rem; color: var(--muted); }

/* ---------- browse tiles ---------- */
.browse { padding-block: 36px 20px; }
.cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 800px) { .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
.cat { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); height: 100%; box-shadow: var(--shadow); }
.cat:hover { border-color: var(--leaf); color: var(--text); }
.cat-img { aspect-ratio: 4 / 3; background: var(--sage); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-book img { width: auto; height: 86%; object-fit: contain; box-shadow: 0 6px 14px rgba(29,46,33,.22); border-radius: 2px; }
.cat-name { font: 650 1.05rem/1.2 var(--serif); color: var(--ink); padding: 12px 14px 2px; }
.cat-n { font-size: .85rem; color: var(--muted); padding: 0 14px 12px; }

/* ---------- how it works ---------- */
.how { padding-block: 30px; }
.how-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 800px) { .how-steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.how-steps li { counter-increment: s; background: var(--sage); border-radius: var(--radius); padding: 18px 18px 16px 62px; position: relative; }
.how-steps li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 34px; height: 34px; border-radius: 50%; background: var(--forest); color: #fff; font: 650 1.05rem/34px var(--serif); text-align: center; }
.how-steps strong { display: block; color: var(--ink); }

/* ---------- signup ---------- */
.signup { padding-block: 34px 48px; }
.signup-card { display: grid; gap: 18px; }
.signup-card > * { min-width: 0; }
@media (min-width: 860px) { .signup-card { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; } }
.signup-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 22px; box-shadow: var(--shadow); padding: 24px 20px; }
@media (min-width: 860px) { .signup-card { padding: 36px 40px; } }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--terracotta); margin-bottom: .4em; }
.signup-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.opt { font-weight: 400; color: var(--muted); }
.field input { width: 100%; font: inherit; padding: 11px 12px; border: 1.5px solid #b9ae97; border-radius: 10px; background: #fff; color: var(--text); }
.field input:focus { border-color: var(--forest); outline: 3px solid rgba(47, 74, 54, .25); outline-offset: 0; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: .92rem; }
.consent input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--forest); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup-form .btn { justify-self: start; }
fieldset[disabled] { opacity: .72; }
fieldset[disabled] .btn { cursor: not-allowed; }
.form-off { background: var(--sage); border-radius: 10px; padding: 10px 12px; font-size: .92rem; margin: 14px 0 0; }
.form-status { font-weight: 600; margin: 12px 0 0; }
.form-status:empty { display: none; }
.form-status.ok { color: var(--forest); }
.form-status.err { color: #9b2c1f; }
.privacy-note { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }

/* ---------- inner pages ---------- */
.page-head { background: var(--cream) url("../img/banner-1280.webp") right center / auto 100% no-repeat; border-bottom: 1px solid var(--rule); padding-block: 34px 26px; }
.page-head .wrap > * { max-width: 40em; }
.page-head .lede { font-size: 1.05rem; color: var(--text); margin: 0; }
@media (max-width: 899px) { .page-head { background-image: none; } }
@media (min-width: 900px) { .page-head .wrap > * { max-width: 52%; } .page-head { padding-block: 48px 40px; } }
.catalog { padding-block: 22px 40px; }
.filters { display: grid; gap: 8px; margin-bottom: 14px; }
.chip-row { display: grid; gap: 4px; min-width: 0; }
@media (min-width: 800px) { .chip-row { grid-template-columns: 6.5em 1fr; align-items: center; } }
.chip-label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
@media (min-width: 800px) { .chips { flex-wrap: wrap; overflow: visible; } }
.chip { flex: none; font: 600 .9rem/1 var(--sans); padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--paper); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--leaf); }
.chip[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }
.chip-n { font-weight: 400; opacity: .75; margin-left: 2px; }
.result-count { font-size: .9rem; color: var(--muted); margin: 0 0 12px; min-height: 1.4em; }
.empty { padding: 30px 0; text-align: center; color: var(--muted); }
.jump ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .92rem; }
.js .jump { display: none; }
.gift-section { padding-top: 18px; }
.gift-section[hidden] { display: none; }
.gift-section h2 { font-size: 1.4rem; display: flex; align-items: baseline; gap: 8px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; margin-bottom: 14px; }
.gift-section .count { font: 600 .85rem var(--sans); color: var(--muted); }
.store-link { margin-top: 30px; text-align: center; }
.prose-wrap { padding-block: 26px 48px; }
.prose { max-width: 46em; }
.prose h2 { font-size: 1.4rem; margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.sig { margin-top: 2em; color: var(--muted); font-style: italic; }

/* ---------- footer ---------- */
.site-foot { background: var(--forest); color: #e9efe3; padding-block: 34px 26px; font-size: .92rem; }
.site-foot a { color: #fff; }
.site-foot a:hover { color: #f4c9b4; }
.foot-grid { display: grid; gap: 22px; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1.1fr .8fr 2fr; gap: 36px; } }
.foot-brand { display: flex; gap: 12px; align-items: flex-start; }
.foot-brand img { border-radius: 10px; flex: none; }
.foot-brand strong { font-family: var(--serif); font-size: 1.1rem; color: #fff; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-note p { color: #d6dfd0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-head, .filters, .signup, .site-foot nav { display: none; } }
