/* Herbert Designs — a bindery's front room.
   Layout: one centered text column, wide enough for a shelf of cards;
   a book-cloth band for the hero, gilt used only for small marks. */

/* ---------- Fonts ----------
   Hosted on this site (assets/fonts) instead of Google Fonts, so pages load faster.
   Same typefaces and weights as before: IM Fell English, Literata, Public Sans. */
@font-face { font-family: "IM Fell English"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/im-fell-english-400.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/im-fell-english-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("fonts/literata.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/literata-italic.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("fonts/public-sans.woff2") format("woff2"); }
:root {
  --paper: #EEECE2;      /* laid paper */
  --sheet: #F8F7F1;      /* a fresh leaf */
  --ink: #1E1C17;        /* printing ink */
  --muted: #5F5B50;
  --rule: #D5D1C2;
  --cloth: #1E5746;      /* green bookcloth */
  --cloth-deep: #163F33;
  --cloth-ink: #F3F1E7;
  --gilt: #A87A22;       /* gold tooling */
  --ok: #1E5746;
  --err: #A3262A;
  --err-bg: #F8E3E1;
  --shadow: 0 1px 2px rgba(30, 28, 23, .08), 0 8px 22px rgba(30, 28, 23, .08);

  /* Book covers keep their own colors in both themes: they are objects. */
  --cover-oxblood: #5B1F24;
  --cover-navy: #1D2B45;
  --cover-green: #1E5746;
  --cover-slate: #3B4247;
  --cover-gilt: #D8B565;

  --f-display: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --f-body: "Literata", "Iowan Old Style", Georgia, serif;
  --f-ui: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: 2.3rem;
  --step-4: clamp(2.4rem, 5.5vw, 3.6rem);
  --measure: 64ch;
  --wide: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121411; --sheet: #1A1D19; --ink: #E9E6DB; --muted: #A39E90; --rule: #30342D;
    --cloth: #7DC3A9; --cloth-deep: #1B3A30; --cloth-ink: #0D1914; --gilt: #DBB05A;
    --ok: #7DC3A9; --err: #F28C8E; --err-bg: #331A1B;
    --shadow: 0 1px 2px rgba(0,0,0,.45), 0 8px 22px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121411; --sheet: #1A1D19; --ink: #E9E6DB; --muted: #A39E90; --rule: #30342D;
  --cloth: #7DC3A9; --cloth-deep: #1B3A30; --cloth-ink: #0D1914; --gilt: #DBB05A;
  --ok: #7DC3A9; --err: #F28C8E; --err-bg: #331A1B;
  --shadow: 0 1px 2px rgba(0,0,0,.45), 0 8px 22px rgba(0,0,0,.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--cloth); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gilt); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font-family: var(--f-ui); font-size: .75rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-head .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 28px; padding-block: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--f-display); font-size: 1.6rem; line-height: 1; letter-spacing: .01em; }
.brand-sub { display: block; font-family: var(--f-ui); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-family: var(--f-ui); font-size: .95rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { border-bottom-color: var(--gilt); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-ui); font-size: .95rem; font-weight: 600;
  padding: 11px 18px; border-radius: 4px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--cloth); background: var(--cloth); color: var(--cloth-ink);
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--cloth); }
.btn.on-cloth { background: var(--cloth-ink); color: var(--cloth-deep); border-color: var(--cloth-ink); }
.btn.on-cloth.ghost { background: transparent; color: var(--cloth-ink); border-color: color-mix(in srgb, var(--cloth-ink) 55%, transparent); }
.btn[aria-disabled="true"] { background: transparent; color: var(--muted); border-color: var(--rule); cursor: default; filter: none; }

/* ---------- Hero (home) ---------- */
.hero { background: var(--cloth-deep); color: #F3F1E7; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 40px; align-items: center; padding-block: 64px 60px;
}
.hero h1 { font-size: var(--step-4); }
.hero .lede { font-size: var(--step-1); line-height: 1.5; max-width: 34ch; margin-top: 18px; color: #DCE3DA; }
.hero .eyebrow { color: #C9B27A; margin-bottom: 14px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .btn.on-cloth { background: #F3F1E7; color: #163F33; border-color: #F3F1E7; }
.hero .btn.on-cloth.ghost { background: transparent; color: #F3F1E7; border-color: rgba(243,241,231,.5); }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 44px; } .spine { width: min(100%, 240px); } }

/* Spine of a text block: each strip is one signature, each mark a collation mark. */
.spine-fig { margin: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.spine {
  display: flex; gap: 2px; padding: 10px; border-radius: 3px;
  background: #E7E2D2; box-shadow: 0 10px 30px rgba(0,0,0,.35);
  width: min(100%, 320px); aspect-ratio: 1 / 1.25;
}
.spine span { flex: 1 1 0; position: relative; background: #F5F1E4; border-radius: 1px; }
.spine span::after {
  content: ""; position: absolute; left: 0; right: 0; height: 5%;
  top: calc(6% + var(--i) * 8.6%); background: #1E1C17;
}
.spine span::before { /* kettle stitch line */
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(30,28,23,.12);
}
.spine-fig figcaption { font-family: var(--f-ui); font-size: .82rem; color: #C5CEC3; max-width: 34ch; text-align: center; }

/* ---------- Sections ---------- */
.section { padding-block: 64px; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; max-width: var(--measure); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--muted); }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 860px) { .trio { grid-template-columns: minmax(0, 1fr); } }
.trio article { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 3px solid var(--ink); }
.trio h3 { font-size: var(--step-2); }
.trio p { color: var(--muted); }
.trio .more { margin-top: auto; padding-top: 6px; font-family: var(--f-ui); font-weight: 600; font-size: .95rem; }

/* Quire feature on home */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
@media (max-width: 860px) { .feature { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.feature h2 { font-size: var(--step-3); }
.feature .copy { display: flex; flex-direction: column; gap: 16px; max-width: var(--measure); }
.feature ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.order {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 20px;
  font-family: var(--f-ui); display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.order h3 { font-family: var(--f-ui); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.order-table { overflow-x: auto; }
.order table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: .95rem; }
.order th, .order td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.order th { font-weight: 600; color: var(--muted); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.order td.pp { font-family: var(--f-body); }
.order td.pp b { color: var(--cloth); font-weight: 600; }
.order .note { font-size: .85rem; color: var(--muted); }

/* ---------- Page heads ---------- */
.page-head { padding-block: 52px 8px; }
.page-head .wrap > div { display: flex; flex-direction: column; gap: 12px; max-width: var(--measure); }
.page-head h1 { font-size: var(--step-4); }
.page-head p { font-size: var(--step-1); line-height: 1.5; color: var(--muted); }

/* ---------- Store ---------- */
.shelf-group + .shelf-group { margin-top: 56px; }
.shelf-group > h2 { font-size: var(--step-2); padding-bottom: 10px; border-bottom: 1px solid var(--rule); margin-bottom: 24px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 32px 28px; }
.product { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.product h3 { font-size: var(--step-2); }
.product .by { font-family: var(--f-ui); font-size: .85rem; color: var(--muted); }
.product p.desc { color: var(--muted); font-size: 1rem; }
.specs { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; font-family: var(--f-ui); font-size: .88rem; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-variant-numeric: tabular-nums; }
.formats { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.format {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--rule); font-family: var(--f-ui); font-size: .95rem;
}
.format .price { color: var(--muted); font-size: .88rem; display: block; }
.format .btn { padding: 8px 14px; font-size: .88rem; flex: none; }

/* Typographic book covers */
.cover {
  aspect-ratio: 6 / 9; width: 100%; max-width: 100%; border-radius: 2px 5px 5px 2px;
  position: relative; overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 14% 12%; text-align: center; color: var(--cover-gilt);
  background: var(--c, var(--cover-green));
}
.cover::before { /* hinge */
  content: ""; position: absolute; top: 0; bottom: 0; left: 6%; width: 2px; background: rgba(0,0,0,.28);
  box-shadow: 2px 0 0 rgba(255,255,255,.06);
}
.cover::after { /* gilt frame */
  content: ""; position: absolute; inset: 7% 8% 7% 12%; border: 1px solid color-mix(in srgb, var(--cover-gilt) 60%, transparent);
  pointer-events: none;
}
.cover .t { font-family: var(--f-display); font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.1; }
.cover .a { font-family: var(--f-ui); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; }
.cover .rule { width: 34px; height: 1px; background: var(--cover-gilt); opacity: .7; }
.cover .imp { position: absolute; bottom: 11%; font-family: var(--f-ui); font-size: .6rem; letter-spacing: .24em; text-transform: uppercase; opacity: .8; }
.cover.plan {
  background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); box-shadow: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--cloth) 10%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--cloth) 10%, transparent) 1px, transparent 1px);
  background-size: 18px 18px;
}
.cover.plan::before, .cover.plan::after { display: none; }
.cover.plan svg { width: 82%; height: auto; color: var(--cloth); }
.cover.plan .a { color: var(--muted); }
.cover.next {
  background: transparent; box-shadow: none; border: 1.5px dashed var(--rule); color: var(--muted);
}
.cover.next::before, .cover.next::after { display: none; }
.cover.next .t { font-size: 1.3rem; }

.store-note {
  margin-top: 56px; padding: 20px 22px; border: 1px solid var(--rule); border-radius: 4px; background: var(--sheet);
  font-family: var(--f-ui); font-size: .95rem; display: flex; flex-direction: column; gap: 6px; max-width: 72ch;
}

/* ---------- About ---------- */
.prose { max-width: var(--measure); display: flex; flex-direction: column; gap: 18px; }
.prose h2 { font-size: var(--step-2); margin-top: 18px; }
.prose p:first-of-type::first-letter {
  font-family: var(--f-display); float: left; font-size: 3.6em; line-height: .82; padding: 6px 8px 0 0; color: var(--cloth);
}
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 56px; align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.colophon {
  font-family: var(--f-ui); font-size: .9rem; border-top: 3px solid var(--ink); padding-top: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.colophon dl { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.colophon dt { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.colophon dd { margin: 2px 0 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
form.contact { display: flex; flex-direction: column; gap: 18px; font-family: var(--f-ui); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--sheet);
  border: 1px solid var(--rule); border-radius: 4px; padding: 10px 12px; width: 100%; min-width: 0;
}
.field textarea { min-height: 170px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--cloth); outline-offset: 1px; border-color: var(--cloth); }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: .95rem; min-height: 1.5em; }
.form-status.ok { color: var(--ok); font-weight: 600; }
.form-status.bad { color: var(--err); background: var(--err-bg); padding: 10px 12px; border-radius: 4px; }
.aside-card { display: flex; flex-direction: column; gap: 16px; font-family: var(--f-ui); font-size: .95rem; border-top: 3px solid var(--ink); padding-top: 16px; }
.aside-card h2 { font-family: var(--f-display); font-size: var(--step-2); }
.aside-card ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--rule); margin-top: 24px; }
.site-foot .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 28px;
  padding-block: 28px 36px; font-family: var(--f-ui); font-size: .88rem; color: var(--muted);
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-foot a { color: var(--muted); }
.collation { display: flex; gap: 3px; height: 22px; align-items: flex-start; }
.collation i { display: block; width: 5px; height: 6px; background: var(--ink); opacity: .75; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } 

}

.spine-fig .hero-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 460px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

/* ---------- Social links (footer) ---------- */
.social { display: flex; gap: 16px; align-items: center; }
.social a { color: var(--muted); display: inline-flex; padding: 2px; }
.social a:hover { color: var(--ink); }
.social svg { width: 20px; height: 20px; }

/* ---------- Privacy / policy pages ---------- */
.policy h2 { scroll-margin-top: 24px; }
.policy ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.policy-note { background: var(--sheet); border-left: 3px solid var(--cloth); padding: 14px 16px; border-radius: 0 4px 4px 0; }
.policy-table table { border-collapse: collapse; width: 100%; font-family: var(--f-ui); font-size: .9rem; line-height: 1.45; }
.policy-table th {
  text-align: left; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  font-weight: 600; padding: 0 14px 8px 0; border-bottom: 2px solid var(--ink);
}
.policy-table td { vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule); }
.policy-table td:first-child { font-weight: 600; width: 32%; }
@media (max-width: 600px) {
  .policy-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .policy-table table, .policy-table tbody, .policy-table tr, .policy-table td { display: block; width: auto; }
  .policy-table tr { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .policy-table tr:first-child { border-top: 2px solid var(--ink); }
  .policy-table td { border: 0; padding: 3px 0; }
  .policy-table td:first-child { width: auto; font-size: 1rem; padding-bottom: 6px; }
  .policy-table td:not(:first-child)::before {
    content: attr(data-label); display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--muted); font-weight: 600;
  }
}
.policy-toc { position: sticky; top: 24px; }
.policy-toc .toc-label { margin: 6px 0 6px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.policy-toc ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 860px) { .policy-toc { position: static; } }
.policy-table .cookie-names { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.policy-table.cookies td:first-child { width: auto; }
