/* =========================================================
   barringtontales - site.css
   One stylesheet. No framework. No build step.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --ink:        #23201d;
  --ink-2:      #5c5550;
  --paper:      #fdfaf4;
  --cream:      #f6efe2;
  --rule:       #e4d9c6;
  --sun:        #f2a93b;
  --sky:        #3d7f9c;
  --berry:      #c8553d;
  --berry-dark: #9c4231;

  --font-body: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-ui:   "Trebuchet MS", "Avenir Next", Verdana, system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0:  1.0625rem;
  --step-1:  1.1875rem;
  --step-2:  clamp(1.5rem, 1.15rem + 1.4vw, 2.125rem);
  --step-3:  clamp(2rem, 1.4rem + 2.6vw, 3.25rem);

  --space-xs: 0.5rem;
  --space-s:  1rem;
  --space-m:  2rem;
  --space-l:  3.5rem;
  --space-xl: 5.5rem;

  --wrap:    68rem;
  --measure: 62ch;
  --radius:  12px;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body,
h1, h2, h3, h4,
p, ul, ol, figure, blockquote { margin: 0; }

ul[class], ol[class] { list-style: none; padding: 0; }

img, picture, iframe, svg { display: block; max-width: 100%; }
img { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- 3. Base typography ---------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-ui);
  line-height: 1.15;
  text-wrap: balance;
}

h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

p { text-wrap: pretty; }

a { color: var(--berry); text-underline-offset: .18em; }
a:hover { color: var(--berry-dark); }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- 4. Layout ---------- */
.wrap {
  width: min(100% - 3rem, var(--wrap));
  margin-inline: auto;
}

.section        { padding-block: var(--space-xl); }
.section--tight { padding-block: var(--space-l); }
.section--cream { background: var(--cream); }
.section + .section:not(.section--cream) { border-top: 1px solid var(--rule); }

.stack > * + *      { margin-block-start: var(--space-s); }
.stack-m > * + *    { margin-block-start: var(--space-m); }
.prose             { max-width: var(--measure); }
.prose > * + *     { margin-block-start: 1.1em; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--paper); padding: .75rem 1.25rem;
  border-radius: var(--radius); z-index: 100;
  font-family: var(--font-ui); font-weight: 700;
}
.skip-link:focus { left: 1.5rem; top: .75rem; }

/* ---------- 5. Header + nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-m); padding-block: .875rem;
  position: relative;
}

.brand {
  font-family: var(--font-ui); font-weight: 700;
  font-size: 1.25rem; letter-spacing: .01em;
  color: var(--ink); text-decoration: none;
}
.brand em { font-style: normal; color: var(--sun); }

.nav__list {
  display: flex; gap: 1.75rem;
  font-family: var(--font-ui); font-size: .9375rem;
}
.nav__list a {
  color: var(--ink-2); text-decoration: none;
  padding-block: .25rem;
  border-bottom: 2px solid transparent;
}
.nav__list a:hover,
.nav__list a[aria-current="page"] {
  color: var(--ink); border-bottom-color: var(--sun);
}

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--rule);
  border-radius: 8px; padding: .5rem .875rem;
  font-family: var(--font-ui); font-size: .9375rem; cursor: pointer;
}

@media (max-width: 48rem) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; inset-inline: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0 1.5rem .75rem;
  }
  .nav[hidden] { display: none; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a {
    display: block; padding-block: .875rem;
    border-bottom: 1px solid var(--rule);
  }
  .nav__list li:last-child a { border-bottom: 0; }
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-ui); font-weight: 700; font-size: .9375rem;
  text-decoration: none; text-align: center;
  padding: .8125rem 1.625rem; border-radius: 999px;
  border: 2px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn--primary {
  background: var(--berry); color: #fff;
  box-shadow: 0 5px 0 var(--berry-dark);
}
.btn--primary:hover {
  color: #fff; transform: translateY(2px);
  box-shadow: 0 3px 0 var(--berry-dark);
}
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- 7. Page header ---------- */
.page-header {
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  padding-block: var(--space-l);
}
.page-header .prose { margin-block-start: var(--space-s); }

.eyebrow {
  font-family: var(--font-ui); font-weight: 700;
  font-size: .75rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--sky);
  margin-block-end: .75rem;
}

.lede { font-size: var(--step-1); color: var(--ink-2); }

/* ---------- 8. Hero ---------- */
.hero {
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  padding-block: var(--space-xl);
}
.hero__grid {
  display: grid; gap: var(--space-l);
  grid-template-columns: 1.05fr .95fr; align-items: center;
}
.hero__art {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 18px 40px rgb(35 32 29 / .14);
}
@media (max-width: 54rem) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-m); }
}

/* ---------- 9. Book entry ---------- */
.book {
  display: grid; gap: var(--space-l);
  grid-template-columns: 17rem 1fr; align-items: start;
}
.book + .book { margin-block-start: var(--space-l); }
.book__cover {
  border-radius: 6px;
  box-shadow: 0 14px 32px rgb(35 32 29 / .18);
}
.book__meta {
  font-family: var(--font-ui); font-weight: 700;
  font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sky);
}
@media (max-width: 44rem) {
  .book { grid-template-columns: 1fr; gap: var(--space-s); }
  .book__cover { max-width: 15rem; }
}

/* ---------- 10. Card grid ---------- */
.grid {
  display: grid; gap: var(--space-m);
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}

.card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease;
}
.card:hover {
  color: inherit; transform: translateY(-4px);
  box-shadow: 0 14px 28px rgb(35 32 29 / .13);
}
.card img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; background: var(--cream); }
.card__label {
  padding: .875rem 1rem;
  font-family: var(--font-ui); font-weight: 700; font-size: .9375rem;
}
.card__label span {
  display: block; margin-block-start: .2rem;
  font-weight: 400; font-size: .8125rem; color: var(--ink-2);
}

/* ---------- 11. Gallery ---------- */
.gallery {
  display: grid; gap: var(--space-s);
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}
.gallery figure {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--rule); background: #fff;
}
.gallery img { width: 100%; }
.gallery figcaption {
  padding: .75rem 1rem;
  font-family: var(--font-ui); font-size: .8125rem; color: var(--ink-2);
}

/* ---------- 12. Video ---------- */
.video {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 14px 32px rgb(35 32 29 / .16);
  aspect-ratio: 16 / 9;
}
.video iframe { width: 100%; height: 100%; border: 0; }

/* ---------- 13. Media block (about) ---------- */
.media {
  display: grid; gap: var(--space-l);
  grid-template-columns: 18rem 1fr; align-items: center;
}
.media img { border-radius: var(--radius); }
@media (max-width: 48rem) {
  .media { grid-template-columns: 1fr; gap: var(--space-m); }
  .media img { max-width: 18rem; }
}

/* ---------- 14. Signup ---------- */
.signup {
  display: flex; flex-wrap: wrap; gap: .75rem;
  max-width: 34rem;
}
.signup input {
  flex: 1 1 15rem;
  padding: .8125rem 1rem;
  border: 1px solid var(--rule); border-radius: 10px;
  background: #fff;
}
.signup button {
  border: 0; cursor: pointer; border-radius: 10px;
  background: var(--sun); color: var(--ink);
  font-family: var(--font-ui); font-weight: 700; font-size: .9375rem;
  padding: .8125rem 1.75rem;
}
.signup button:hover { background: #e29a2d; }

.fineprint { font-size: var(--step--1); color: var(--ink-2); }

.socials { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.socials a {
  font-family: var(--font-ui); font-weight: 700; font-size: .9375rem;
  color: var(--ink); text-decoration: none;
  border-bottom: 2px solid var(--sun); padding-block-end: .1rem;
}
.socials a:hover { color: var(--berry); }

/* ---------- 15. Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: var(--space-m);
  font-size: var(--step--1); color: var(--ink-2);
  text-align: center;
}
.site-footer a { color: var(--ink-2); }
