/* ==========================================================
   Book Nook - stylesheet
   Direction: a cosy independent bookshop. Warm paper, deep
   maroon and forest green, serif type, hand-drawn line art.
   Edit the colours and fonts in :root below.
   ========================================================== */

:root {
  --paper: #f8f1e4;
  --paper-2: #efe3cd;
  --cream: #fffcf5;
  --ink: #2b231c;
  --ink-soft: #5b4d3d;
  --maroon: #7c2e2e;
  --maroon-dark: #5e2121;
  --forest: #3f5540;
  --gold: #b9893f;
  --line: #ddcba8;

  --display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --body: "Lora", Georgia, "Times New Roman", serif;

  --wrap: 1140px;
  --gutter: clamp(1.1rem, 4vw, 2rem);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--maroon); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--gold); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--gold); color: var(--ink); padding: .7rem 1rem; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

[id] { scroll-margin-top: 5.5rem; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 .45em; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-style: italic; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; max-width: 42ch; color: var(--ink-soft); }

.kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--body); font-style: italic; color: var(--maroon);
  font-size: 1.05rem; margin-bottom: .8rem;
}
.kicker svg { width: 1.1rem; height: 1.1rem; color: var(--gold); }

/* decorative divider: a small flourish between sections */
.flourish { display: flex; justify-content: center; margin: 0; color: var(--gold); }
.flourish svg { width: 90px; height: 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font: 600 1rem/1 var(--body); font-style: italic;
  padding: .9rem 1.6rem; border-radius: 999px;
  border: 1.5px solid var(--maroon); background: var(--maroon); color: var(--cream);
  text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--maroon-dark); border-color: var(--maroon-dark); }
.btn--ghost { background: transparent; color: var(--maroon); }
.btn--ghost:hover { background: var(--maroon); color: var(--cream); }
.on-dark .btn--ghost { color: var(--cream); border-color: var(--cream); }
.on-dark .btn--ghost:hover { background: var(--cream); color: var(--ink); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--cream); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.6rem; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand svg { width: 2.1rem; height: 2.1rem; color: var(--maroon); }
.brand span { font: italic 700 1.7rem/1 var(--display); color: var(--ink); }

.nav-toggle { display: none; background: none; border: 1.5px solid var(--ink); border-radius: var(--radius); padding: .55rem .8rem; font: 600 .95rem var(--body); color: var(--ink); cursor: pointer; }

.site-nav ul { list-style: none; display: flex; align-items: center; gap: .2rem; margin: 0; padding: 0; }
.site-nav a { display: block; padding: .6rem .85rem; text-decoration: none; font-weight: 600; font-style: italic; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--gold); color: var(--maroon); }
.site-nav .nav-cta a { margin-left: .5rem; background: var(--maroon); color: var(--cream); border-radius: 999px; padding: .6rem 1.2rem; font-weight: 600; border-bottom: none; }
.site-nav .nav-cta a:hover { background: var(--maroon-dark); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--cream); border-bottom: 1px solid var(--line); display: none; padding: .5rem var(--gutter) 1.2rem; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .site-nav .nav-cta a { margin: 1rem 0 0; text-align: center; display: block; }
}

/* ---------- hero ---------- */
.hero {
  padding: clamp(2.6rem, 6vw, 5rem) 0 clamp(2.6rem, 6vw, 4.5rem);
  background: radial-gradient(ellipse 70% 60% at 85% 0%, rgba(185,137,63,.16), transparent 60%), var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero h1 { max-width: 11ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.7rem; }

.hero--center .wrap { grid-template-columns: 1fr; text-align: center; max-width: 54rem; }
.hero--center h1 { max-width: none; margin-inline: auto; }

.nook-art { width: 100%; height: auto; color: var(--ink); }
.nook-art .line { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nook-art .fill-paper { fill: var(--cream); }
.nook-art .fill-maroon { fill: var(--maroon); }
.nook-art .fill-forest { fill: var(--forest); }
.nook-art .fill-gold { fill: var(--gold); }
.nook-art .thin { stroke: var(--ink-soft); stroke-width: 1; fill: none; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 14ch; }
}

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--cream { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--dark { background: var(--ink); color: #ece3d2; }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 2.6rem; }
.section-head .lede { max-width: none; margin-inline: auto; }

/* shelf: category rows with a ruled line, like a library index */
.shelf { border-top: 1px solid var(--ink); }
.shelf-row {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 1.2rem; align-items: center;
  padding: 1.6rem 0; border-bottom: 1px solid var(--line);
}
.shelf-row .icon { width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; border: 1px solid var(--line); }
.shelf-row .icon svg { width: 2.2rem; height: 2.2rem; color: var(--maroon); }
.shelf-row h3 { margin: 0 0 .25rem; }
.shelf-row p { margin: 0; color: var(--ink-soft); max-width: 56ch; }
.shelf-row .more { font-style: italic; font-weight: 600; color: var(--maroon); text-decoration: none; white-space: nowrap; }
.shelf-row .more:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .shelf-row { grid-template-columns: 3.4rem 1fr; }
  .shelf-row .more { grid-column: 2; }
}

/* steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.8rem; text-align: center; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 3rem; height: 3rem; margin: 0 auto .9rem;
  border-radius: 50%; border: 1.5px solid var(--maroon); color: var(--maroon); font: italic 700 1.3rem var(--display);
}
.steps h3 { font-size: 1.25rem; }
.steps p { color: var(--ink-soft); font-size: .98rem; margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .steps { grid-template-columns: 1fr; } }

/* quote / staff pick style */
.pick { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2.5rem; align-items: center; }
.pick blockquote { margin: 0; font-family: var(--display); font-style: italic; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.4; }
.pick cite { display: block; margin-top: 1rem; font-style: normal; font-weight: 600; color: var(--gold); }
@media (max-width: 800px) { .pick { grid-template-columns: 1fr; } }

/* cta band */
.cta { background: var(--forest); color: var(--cream); padding: clamp(2.6rem, 6vw, 4rem) 0; }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta h2 { color: var(--cream); margin: 0 0 .3rem; }
.cta p { margin: 0; max-width: 46ch; color: #d9e3da; }

/* ---------- inner pages ---------- */
.page-head { padding: clamp(2.6rem, 6vw, 4.2rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); text-align: center; }
.page-head h1 { font-size: clamp(2.6rem, 5.5vw, 3.8rem); }
.page-head p { margin: 0 auto; max-width: 56ch; font-size: 1.15rem; color: var(--ink-soft); }

.two-col { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 2rem; } }
.two-col p { max-width: 62ch; }

.facts { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.7rem; }
.facts h2 { font-size: 1.5rem; }
.facts dl { margin: 0; }
.facts dt { font-weight: 700; margin-top: .9rem; font-family: var(--display); }
.facts dt:first-of-type { margin-top: 0; }
.facts dd { margin: 0; color: var(--ink-soft); }

.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.principles li { border-left: 3px solid var(--gold); padding-left: 1.2rem; }
.principles h3 { margin-bottom: .2rem; }
.principles p { margin: 0; color: var(--ink-soft); max-width: 58ch; }

details { border-top: 1px solid var(--line); padding: 1.1rem 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 1.15rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 700 1.6rem var(--display); color: var(--maroon); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: .8rem 0 0; max-width: 62ch; color: var(--ink-soft); }

/* contact */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 700; font-family: var(--display); margin-bottom: .35rem; }
.field .opt { font-weight: 400; font-family: var(--body); color: var(--ink-soft); }
.err { color: var(--maroon-dark); font-weight: 600; font-size: .95rem; margin: .35rem 0 0; }
.check { display: flex; gap: .7rem; align-items: flex-start; }
.check input { width: 1.3rem; height: 1.3rem; margin-top: .2rem; flex: none; accent-color: var(--maroon); }
.check label { font-weight: 400; font-family: var(--body); margin: 0; }
.status { margin-top: 1rem; padding: 1rem 1.2rem; border-radius: var(--radius); border-left: 5px solid var(--forest); background: #eaf0ea; font-weight: 600; }
.status.is-error { border-left-color: var(--maroon); background: #f6e7e5; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

input, select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--cream); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: .8rem .9rem;
}
input:hover, select:hover, textarea:hover { border-color: var(--gold); }
input:focus, select:focus, textarea:focus { border-color: var(--maroon); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--maroon-dark); }
textarea { min-height: 9rem; resize: vertical; }

.contact-details { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.7rem; }
.contact-details h2 { font-size: 1.5rem; }
.contact-details h3 { font-family: var(--display); font-size: 1.05rem; margin: 1.2rem 0 .1rem; }
.contact-details p { margin: 0; }

/* legal pages */
.legal { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: 3rem; align-items: start; }
.toc { position: sticky; top: 6rem; font-size: .95rem; }
.toc h2 { font-size: 1.25rem; margin-bottom: .5rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: .4rem; }
.prose { max-width: 72ch; }
.prose section { margin-bottom: 2.4rem; }
.prose h2 { font-size: 1.9rem; }
.prose h3 { font-family: var(--display); font-size: 1.1rem; margin: 1.4rem 0 .3rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.updated { color: var(--ink-soft); font-style: italic; margin-bottom: 2rem; }
@media (max-width: 860px) { .legal { grid-template-columns: 1fr; gap: 1.5rem; } .toc { position: static; } }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #d9cdb8; padding: 3.2rem 0 1.6rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 2rem; }
.site-footer h2 { font: 700 1rem var(--display); color: var(--cream); margin: 0 0 .7rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer .brand { color: var(--cream); margin-bottom: .8rem; }
.site-footer .brand svg { color: var(--gold); }
.site-footer address { font-style: normal; }
.fine { margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid #45392c; font-size: .9rem; color: #a99b84; }
.fine p { margin: 0 0 .3rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* 404 */
.lost { padding: 6rem 0; text-align: center; }
.lost h1 { font-size: clamp(3.4rem, 12vw, 7rem); }
