/* =========================================================================
   Starlight Ink LLC — styles.css
   Palette: soft cream, muted navy, dusty blue, restrained warm gold.
   Change any color site-wide by editing the variables just below.
   ========================================================================= */

:root {
  /* ---- COLORS: edit these to re-theme the whole site ---- */
  --cream:        #FAF6EE;  /* soft cream background */
  --cream-deep:   #F3EDE0;  /* slightly deeper cream for cards */
  --navy:         #1F3352;  /* muted navy — headings, header, footer */
  --navy-deep:    #16263E;  /* darker navy for footer / contact */
  --dusty-blue:   #8CA3BF;  /* dusty blue accents */
  --dusty-light:  #DCE4EE;  /* pale dusty-blue section background */
  --gold:         #B08A3C;  /* restrained warm gold accent */
  --gold-soft:    #C9A55C;  /* lighter gold for hovers on dark backgrounds */
  --ink:          #2B3442;  /* body text color */
  --white:        #FFFFFF;

  /* ---- TYPE ---- */
  --font-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body:    "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;

  /* ---- SPACING ---- */
  --section-pad: clamp(4rem, 9vw, 7rem);
  --radius: 10px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Keeps section headings from hiding under the sticky header when you
     click a nav link */
  scroll-padding-top: 6rem;
}

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

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;           /* ~17px — comfortable reading size */
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--cream);
}

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

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: 0; top: -100px;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; }

/* One consistent, visible focus style everywhere */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =========================================================================
   HEADER
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 238, 0.96);  /* cream, slightly translucent */
  border-bottom: 1px solid var(--dusty-light);
  backdrop-filter: blur(6px);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--navy);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-llc {
  font-size: 0.7em;
  color: var(--gold);
  letter-spacing: 0.18em;
}

/* ---- Desktop nav ---- */
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 0.15rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ---- Mobile menu button (hamburger) ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;               /* comfortable tap target */
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hamburger → X animation when open */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  background:
    radial-gradient(ellipse at 70% 20%, rgba(140, 163, 191, 0.18), transparent 55%),
    var(--cream);
  text-align: center;
  padding: calc(var(--section-pad) * 1.15) 1.5rem;
}

.hero-inner { max-width: 46rem; margin: 0 auto; }

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(3rem, 8vw, 4.75rem);
  color: var(--navy);
  line-height: 1.1;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.hero-support {
  color: var(--ink);
  margin-bottom: 2.25rem;
}

/* ---------- Star divider (subtle decorative detail) ---------- */
.star-divider {
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 0.5em;
  margin: 1.25rem 0 1.75rem;
  user-select: none;
}

/* =========================================================================
   BUTTONS — clear hover AND focus states
   ========================================================================= */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 2rem;
  border-radius: 3px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--navy);
}
.btn-primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(31, 51, 82, 0.2);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

/* =========================================================================
   SECTIONS — shared layout
   ========================================================================= */
.section { padding: var(--section-pad) 1.5rem; }

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.section-inner.narrow { max-width: 44rem; }

.section-cream { background: var(--cream); }
.section-cream-deep { background: var(--cream-deep); }
.section-blue  { background: var(--dusty-light); }

.section-navy {
  background: var(--navy-deep);
  color: var(--cream);
}

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3rem);
  color: var(--navy);
  line-height: 1.15;
}

.section-navy .section-title { color: var(--cream); }

/* About paragraphs read better left-aligned with air between them */
.section-inner.narrow p { text-align: left; margin-bottom: 1.25rem; }
.section-inner.narrow p:last-child { margin-bottom: 0; }

/* =========================================================================
   READER PROMISE
   ========================================================================= */
.promise-intro {
  max-width: 44rem;
  margin: 0 auto 3rem;
  text-align: left;
}
.promise-intro p { margin-bottom: 1.25rem; }
.promise-intro p:last-child { margin-bottom: 0; }

.promise-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto 3.5rem;
  text-align: left;
}

.promise-col {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(31, 51, 82, 0.08);
}

.promise-col-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.promise-list { list-style: none; }

.promise-list li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.55rem;
}

.promise-includes li::before {
  content: "❤️";
  position: absolute;
  left: 0;
  font-size: 0.9em;
}

.promise-excludes li::before {
  content: "✗";
  position: absolute;
  left: 0.25rem;
  color: var(--dusty-blue);
  font-weight: 700;
}

.tropes-title { margin-bottom: 1.5rem; }

.trope-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  max-width: 820px;
  margin: 0 auto;
}

.trope-list li {
  background: var(--white);
  border: 1px solid var(--dusty-blue);
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 999px;
}

/* =========================================================================
   FEATURED SERIES / BOOK CARDS
   ========================================================================= */
.series-description {
  max-width: 42rem;
  margin: 0 auto 3.5rem;
}

.book-grid {
  display: grid;
  /* Cards wrap automatically — add as many books as you like */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.book-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(31, 51, 82, 0.08);
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(31, 51, 82, 0.15);
}

.book-cover {
  width: 100%;
  aspect-ratio: 5 / 8;           /* matches your covers' proportions (1600x2560) — no cropping */
  object-fit: cover;
  background: var(--dusty-blue); /* shows while placeholder images are missing */
}

.book-details {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex-grow: 1;
}

.book-badge {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
}

.book-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--navy);
}

.book-description { font-size: 0.98rem; flex-grow: 1; }

.book-release {
  font-size: 0.9rem;
  color: var(--navy);
}
.book-release-label { font-weight: 700; color: var(--gold); }

.book-card .btn { align-self: flex-start; margin-top: 0.35rem; }

/* ---- Inline book-title links inside the series description ---- */
.inline-book-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.inline-book-link:hover { color: var(--gold); }

/* ---- "Also set in Starlight Valley" related books ---- */
.related-books {
  margin-top: 4.5rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(31, 51, 82, 0.15);
}

.related-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.75rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.related-intro {
  max-width: 36rem;
  margin: 0 auto 2.25rem;
  font-size: 0.98rem;
}

.related-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
}

.related-book {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  width: 180px;
  transition: transform 0.2s ease;
}

.related-book:hover { transform: translateY(-4px); }

.related-book img {
  width: 180px;
  aspect-ratio: 5 / 8;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(31, 51, 82, 0.18);
  margin-bottom: 0.65rem;
  transition: box-shadow 0.2s ease;
}

.related-book:hover img { box-shadow: 0 10px 24px rgba(31, 51, 82, 0.28); }

.related-book-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  line-height: 1.3;
}

.related-book:hover .related-book-title { color: var(--gold); }

.related-book-author {
  font-size: 0.85rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =========================================================================
   AUTHOR CARDS
   ========================================================================= */
.author-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  max-width: 860px;
  margin: 0 auto;
}

.author-card {
  background: var(--white);
  border-radius: var(--radius);
  border-top: 3px solid var(--gold);
  padding: 2.5rem 2rem;
  box-shadow: 0 2px 10px rgba(31, 51, 82, 0.08);
  text-align: center;
}

.author-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;             /* circular headshot */
  object-fit: cover;
  object-position: center 18%;    /* keeps faces in frame when cropping tall photos */
  margin: 0 auto 1.5rem;
  background: var(--dusty-blue);  /* shows while placeholder images are missing */
  border: 4px solid var(--cream-deep);
}

.author-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.author-bio {
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.author-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.author-link {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 2px solid var(--dusty-blue);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.author-link:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* =========================================================================
   CONTACT
   ========================================================================= */
.contact-intro {
  font-size: 1.15rem;
  text-align: center !important;   /* overrides the narrow-section left align */
}

.contact-email {
  color: var(--gold-soft);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s ease;
}
.contact-email:hover { color: var(--white); }

.contact-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0 2rem;
  text-align: left;
}

.contact-item {
  background: rgba(250, 246, 238, 0.06);
  border: 1px solid rgba(250, 246, 238, 0.18);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.contact-item h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--gold-soft);
  margin-bottom: 0.35rem;
}

.contact-item p { font-size: 0.95rem; margin: 0; text-align: left; }

.contact-tip {
  font-size: 0.9rem;
  color: var(--dusty-blue);
  text-align: center !important;
  font-style: italic;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  background: var(--navy);
  color: var(--cream);
  padding: 2.5rem 1.5rem;
  border-top: 1px solid rgba(250, 246, 238, 0.15);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-independent {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold-soft);
}

.footer-disclosure {
  font-size: 0.85rem;
  color: var(--dusty-blue);
}

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

.footer-links { font-size: 0.9rem; }

.footer-links a {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
  margin: 0 0.4rem;
}

.footer-links a:hover { color: var(--gold-soft); }

/* =========================================================================
   MOBILE — nav collapses into a menu under 760px
   ========================================================================= */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--dusty-light);
    box-shadow: 0 12px 24px rgba(31, 51, 82, 0.12);

    /* Hidden by default; script.js toggles the .open class */
    display: none;
  }

  .site-nav.open { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }

  .site-nav a {
    display: block;
    padding: 0.9rem 1.5rem;
    border-bottom: none;
  }

  .site-nav a:hover { background: var(--dusty-light); }

  .brand-name { font-size: 1.2rem; }
  .brand-logo { width: 44px; height: 44px; }
}
