/* -------------------------------------
   FONTS
------------------------------------- */

/* Magic Story font (self-hosted) */
@font-face {
  font-family: "Magic Story";
  src:
    url("./magic-story.woff2") format("woff2"),
    url("./magic-story.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Brandon Grotesque font (self-hosted) */
@font-face {
  font-family: "Brandon Grotesque";
  src:
    url("./brandon-grotesque-regular.woff2") format("woff2"),
    url("./brandon-grotesque-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* -------------------------------------
   BASE STYLES
------------------------------------- */

:root {
  --bg: #fffff5;
  --panel: #fffff5;
  --ink: #2c2c2c;
  --lavender: #867BBC;
  --max: 1000px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Brandon Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI",
     Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--lavender);
  line-height: 1.65;
}

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

a {
  color: inherit;
}

h1, h2, h3 {
  font-family: "Magic Story", serif;
  font-weight: 400;
  margin: 0;
  color: var(--lavender);
}

/* -------------------------------------
   HEADER + NAV
------------------------------------- */

header {
  background: var(--bg);
  padding: 1.25rem 1.5rem 2.25rem;
}

/* Top bar with logo */
.header-bar {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.logo-block {
  text-align: left;
}

.logo-block img {
  max-width: 220px;
  height: auto;
  display: block;
  margin-left: 0;
}

.tagline {
  margin-top: 0.35rem;
  font-family: "Brandon Grotesque", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  /* text-transform: uppercase; */
  color: var(--lavender);
}

/* Hero titles */
.page-hero {
  max-width: var(--max);
  margin: .95rem auto 0;
  text-align: center;
}

header h1 {
  font-size: 2.8rem;
  margin-bottom: 0.35rem;
}

header h2 {
  font-size: 1.15rem;
  color: var(--lavender);
}

/* -------------------------------------
   MAIN LAYOUT
------------------------------------- */

main {
  width: 100%;
}

/* Book page section */
.book-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
  text-align: left; /* important: looks more like a real book page */
}

.book-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.25rem;
  align-items: start;
}

/* Cover */
.book-cover {
  margin: 0;
}

.cover {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  box-shadow: 10px 12px 26px rgba(0,0,0,0.14);
  border-radius: 6px;
}

/* Copy */
.book-copy {
  max-width: 620px;
}

.book-description {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  color: var(--lavender);
}

/* Optional small note text */
.fine-print {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-top: 1rem;
}

.author-note {
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(134, 123, 188, 0.25);
  max-width: 560px;
}

.author-note h3 {
  font-family: "Brandon Grotesque", sans-serif;
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.author-note p {
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.4;
}

.author-note p:last-child {
   margin-bottom: 0rem;
}

/* -------------------------------------
   BUTTON
------------------------------------- */

.cta-group {
  margin-top: 1.6rem;
  display: flex;
  justify-content: flex-start;
}

.btn {
  display: inline-block;
  padding: 0.9rem 1.6rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.1rem;
  background: var(--lavender);
  color: var(--bg);
  border: none;
  transform: translateY(0);
  transition: transform 150ms ease, filter 150ms ease;
}

.btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

/* -------------------------------------
   FOOTER
------------------------------------- */

footer {
  background: var(--panel);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--lavender);
}

.footer-links,
.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.footer-links a,
.social-links a {
  text-decoration: none;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
}

.footer-links a:hover,
.social-links a:hover {
  background: rgba(134, 123, 188, 0.12);
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* -------------------------------------
   MOBILE TWEAKS
------------------------------------- */

@media (max-width: 820px) {
  .book-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    text-align: center;
  }

  .book-page {
    text-align: center;
  }

  .book-copy {
    max-width: 700px;
    margin: 0 auto;
    text-align: left; /* keeps paragraphs readable */
  }

  .cta-group {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  header h1 {
    font-size: 2.15rem;
  }

  header h2 {
    font-size: 1.05rem;
  }

  .brand {
    font-size: 1.45rem;
  }

  .nav-links a {
    font-size: 0.95rem;
  }
}
