/* ==========================================================================
   Shelly Powell — site-wide styles
   Layout mirrors the original 980px Wix grid; collapses to one column < 1000px.
   ========================================================================== */

/* ---------- Fonts (self-hosted, open-source substitutes) ----------
   Jost ≈ Brandon Grotesque Light (headings, logo)
   Nunito Sans ≈ Avenir 35 Light (body)                                  */
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-italic-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --font-heading: "Jost", "Brandon Grotesque", "Futura", "Century Gothic", sans-serif;
  --font-body: "Nunito Sans", "Avenir", "Avenir Next", "Segoe UI", sans-serif;
  --font-serif: Georgia, Palatino, "Book Antiqua", "Palatino Linotype", serif;

  --color-text: #000;
  --color-ink: #191919;
  --color-muted: #595959;
  --color-bg: #fff;
  --color-band: #f7f7f7;
  --color-newsletter: #e3f2f3;
  --color-form: #373b4d;
  --color-border: rgba(0, 0, 0, 0.25);

  --page-width: 980px;
  --gutter: 20px;
  --header-height: 128px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font: 300 14px/1.79 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6, p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 8px; top: -60px;
  z-index: 100;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--color-ink);
  font-size: 14px;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 2px solid #116dff; outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 10;
  height: var(--header-height);
  background: var(--color-bg);
}

.site-header .container {
  display: flex;
  align-items: flex-start;
  padding-top: 37px;
}

.logo {
  font: 300 22px/1.41 var(--font-heading);
  letter-spacing: 0.02em;
  color: var(--color-ink);
  white-space: nowrap;
}

.nav-toggle { display: none; }

.site-nav { margin-left: auto; }

.site-nav ul {
  display: flex;
  gap: 16.5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  font: 300 15px/30px var(--font-body);
  color: var(--color-ink);
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: #808080; }

.social {
  display: flex;
  gap: 10px;
  margin: 5px 0 0 24px;
  padding: 0;
  list-style: none;
}

.social a {
  display: block;
  width: 20px; height: 20px;
  color: var(--color-ink);
  transition: opacity 0.2s ease;
}
.social a:hover { opacity: 0.6; }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.social svg[stroke] { fill: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 45px;
  padding: 0 20px;
  border: 1px solid var(--color-ink);
  border-radius: 30px;
  font: 300 16px/1 var(--font-body);
  color: var(--color-ink);
  background: transparent;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--color-ink); color: #fff; }

.btn--solid { background: #000; border-color: #000; color: #fff; }
.btn--solid:hover { background: #fff; color: #000; }

.text-link {
  font: 300 15px/30px var(--font-body);
  color: var(--color-ink);
}
.text-link:hover { color: #808080; }

/* ---------- Grey content band ---------- */
.band { background: var(--color-band); }

/* ---------- Footer ---------- */
.site-footer {
  flex-shrink: 0;
  margin-top: 53px;
  background: var(--color-band);
}
.site-footer p {
  padding: 5px var(--gutter) 6px;
  font: 300 14px/1.79 var(--font-body);
  color: var(--color-ink);
}
.band + .site-footer,
main > .band:last-child { margin-bottom: 0; }

/* ==========================================================================
   Home
   ========================================================================== */
.hero .container {
  display: grid;
  grid-template-columns: 412px 1fr;
  padding-top: 88px;
  padding-bottom: 48px;
}

.hero__cover {
  margin-left: 16px;
  width: 335px;
}
.hero__cover img { width: 335px; height: 535px; object-fit: cover; }

.hero__copy { padding: 22px 0 0 16px; max-width: 568px; }
.hero__copy p { font-size: 14px; line-height: 25px; }
.hero__copy p + p { margin-top: 25px; }

.hero__actions {
  grid-column: 2;
  display: flex;
  gap: 37px;
  margin: 12px 0 0 66px;
}
.hero__actions .btn { font-size: 15px; }
.hero__actions .btn:first-child { width: 193px; }
.hero__actions .btn:last-child { width: 177px; }

.about-teaser .container {
  display: grid;
  grid-template-columns: 460px 460px;
  justify-content: space-between;
  align-items: start;
}

.about-teaser__text { padding-top: 101px; }

.section-title {
  font: 300 40px/1.35 var(--font-heading);
  color: var(--color-ink);
}

.about-teaser__text .section-title { margin-bottom: 26px; }

.about-teaser__text p {
  font-size: 15px;
  line-height: 1.875;
  text-indent: 20px;
}

.about-teaser__text .btn { margin-top: 53px; width: 116px; }

.about-teaser__photo { margin-top: 110px; }
.about-teaser__photo img { width: 460px; height: 367px; object-fit: cover; }

/* Newsletter */
.newsletter .container { padding: 19px 40px; }

.newsletter__box {
  background: var(--color-newsletter);
  padding: 35px 60px 46px;
  font-family: var(--font-serif);
  color: var(--color-form);
}

.newsletter__title {
  max-width: 780px;
  margin: 0 auto 45px;
  font: 400 30px/47px var(--font-serif);
  text-align: center;
  color: #000;
}

.newsletter__fields {
  display: grid;
  grid-template-columns: repeat(3, 240px);
  gap: 30px;
  justify-content: center;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font: italic 14px/1.4 var(--font-serif);
}

.field input {
  width: 100%;
  height: 42px;
  padding: 0 10px;
  border: 1.5px solid var(--color-form);
  border-radius: 0;
  background: #fff;
  font: italic 14px/1.4 var(--font-serif);
  color: #000;
}
.field input::placeholder { color: #404040; opacity: 1; }
.field input:focus { outline: none; border-color: #000; }

.newsletter__consent {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 33px;
  font: italic 14px/18px var(--font-serif);
  color: #000;
}
.newsletter__consent input {
  width: 16px; height: 16px;
  margin: 0;
  accent-color: var(--color-form);
}

.newsletter__submit {
  display: block;
  width: 180px; height: 40px;
  margin: 33px auto 0;
  border: 0;
  background: var(--color-form);
  color: #fff;
  font: 600 14px/1 var(--font-serif);
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.newsletter__submit:hover { opacity: 0.85; }

/* Recent posts (home) */
.recent-home { padding: 142px 0 78px; }

.recent-home__list {
  display: grid;
  grid-template-columns: repeat(3, 292px);
  gap: 32px;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  color: #fff;
  background: #555;
}
.tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.tile:hover img { transform: scale(1.04); }
.tile::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.tile__body {
  position: absolute; inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 0;
}
.tile__meta { font: 300 12px/1.5 var(--font-body); }
.tile__title {
  margin-top: auto;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  font: 300 24px/1.3 var(--font-heading);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile__foot { height: 60px; }

/* ==========================================================================
   About
   ========================================================================== */
.about-page { padding: 120px 0 140px; text-align: center; }

.about-page__photo {
  width: 400px; height: 400px;
  margin: 0 auto 61px;
  border-radius: 50%;
  object-fit: cover;
}

.about-page .section-title { margin-bottom: 26px; }

.about-page__text {
  max-width: 780px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.875;
}
.about-page__text p + p { margin-top: 28px; }
.about-page__text a { text-decoration: underline; }

/* ==========================================================================
   Books (historical romance)
   ========================================================================== */
.books { padding-top: 35px; }

.book {
  display: grid;
  grid-template-columns: 520px 460px;
  align-items: start;
}

.book__title {
  font: 300 22px/1.41 var(--font-heading);
  color: var(--color-ink);
  margin-top: 20px;
}

.book__blurb {
  margin-top: 41px;
  max-width: 514px;
  font-size: 15px;
  line-height: 1.875;
  text-align: justify;
}
.book__blurb p + p { margin-top: 28px; }

.book__buy { display: inline-block; margin-top: 30px; }
.book__buy--none { cursor: default; }

.book__cover { display: flex; justify-content: center; }
.book__cover--crop img { width: 374px; height: 688px; object-fit: cover; }

.book + .book { margin-top: 40px; }

/* ==========================================================================
   Children's books
   ========================================================================== */
.kids { padding: 122px 0 120px; }
.kids article { display: flex; flex-direction: column; align-items: center; }
.kids article p { flex: 1 0 auto; }

.kids .container {
  display: grid;
  grid-template-columns: 460px 460px;
  justify-content: space-between;
  text-align: center;
}

.kids__title {
  font: 300 22px/1.41 var(--font-heading);
  color: var(--color-ink);
  margin-bottom: 57px;
}

.kids__cover {
  height: 340px;
  display: flex;
  justify-content: center;
  margin-bottom: 56px;
}
.kids__cover img { height: 340px; width: auto; }

.kids p { font-size: 15px; line-height: 1.875; }

.kids .btn { margin-top: 60px; width: 144px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1000px) {
  :root { --header-height: auto; }

  .container { padding-inline: var(--gutter); }

  .site-header .container {
    flex-wrap: wrap;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    margin-left: auto;
    padding: 8px;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .nav-toggle span {
    display: block;
    height: 1.5px;
    background: var(--color-ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .site-nav,
  .social { display: none; }

  .site-header.is-open .site-nav,
  .site-header.is-open .social { display: flex; }

  .site-nav { flex-basis: 100%; margin: 12px 0 0; }
  .site-nav ul { flex-direction: column; gap: 0; width: 100%; }
  .site-nav a { padding: 8px 0; font-size: 17px; border-bottom: 1px solid #eee; }
  .social { margin: 16px 0 0; gap: 20px; }

  .hero .container,
  .about-teaser .container,
  .book,
  .kids .container { grid-template-columns: 1fr; }

  .hero .container { padding-top: 24px; gap: 28px; }
  .hero__cover { margin: 0 auto; width: min(335px, 100%); }
  .hero__cover img { width: 100%; height: auto; aspect-ratio: 335 / 535; }
  .hero__copy { padding: 0; max-width: none; }
  .hero__actions { grid-column: auto; margin: 8px 0 0; flex-wrap: wrap; justify-content: center; gap: 16px; }

  .about-teaser .container { padding-bottom: 40px; }
  .about-teaser__text { padding-top: 48px; }
  .about-teaser__photo { margin-top: 32px; order: 2; }
  .about-teaser__photo img { width: 100%; height: auto; aspect-ratio: 460 / 367; }

  .section-title { font-size: 32px; }

  .newsletter .container { padding: 32px var(--gutter); }
  .newsletter__box { padding: 28px 20px 36px; }
  .newsletter__title { font-size: 22px; line-height: 1.5; margin-bottom: 28px; }
  .newsletter__title br { display: none; }
  .newsletter__fields { grid-template-columns: 1fr; gap: 16px; }

  .recent-home { padding: 40px 0 0; }
  .recent-home__list { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

  .about-page { padding: 40px 0; }
  .about-page__photo { width: min(400px, 80vw); height: auto; aspect-ratio: 1; margin-bottom: 36px; }

  .books { padding-top: 0; }
  .book { gap: 24px; }
  .book__cover { order: -1; }
  .book__cover img { max-height: 520px; width: auto; }
  .book__cover--crop img { width: auto; height: auto; object-fit: contain; }
  .book__title { margin-top: 0; }
  .book__blurb { margin-top: 16px; max-width: none; text-align: left; }
  .book + .book { margin-top: 56px; }

  .kids { padding: 40px 0; }
  .kids .container { gap: 64px; }
  .kids__title { margin-bottom: 24px; }
  .kids__cover { height: auto; margin-bottom: 24px; }
  .kids__cover img { height: auto; max-height: 340px; }
  .kids .btn { margin-top: 28px; }

  .site-footer { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
