/* =========================================================================
   Shabazz Enterprise Publishing — site styles
   Hand-built, dependency-free. Organized top-to-bottom:
     1. Design tokens (CSS custom properties)
     2. Reset & base
     3. Layout primitives (container, section, headings)
     4. Buttons
     5. Accessibility helpers (skip link, sr-only, focus, reduced motion)
     6. Header / navigation
     7. Hero
     8. About + services + genres + signature
     9. Book cards + catalog grid (frameless, no-crop covers)
    10. Get-published section (business card)
    11. Footer + scroll-to-top
    12. Responsive refinements

   To restyle the whole site, edit the tokens in section 1 — everything
   downstream reads from them.
   ========================================================================= */

/* 1. ---- Design tokens --------------------------------------------------- */
:root {
  /* Palette — warm "paper" neutrals and a deep palm green from the SEP brand. */
  --paper:        #faf7f1;
  --paper-2:      #f3ede2;
  --white:        #ffffff;
  --ink:          #16201b;
  --ink-2:        #4a554e;
  --green:        #1f6b4f;
  --green-dk:     #143f2f;
  --green-tint:   #e9f1ec;
  --green-line:   #d4e2d9;
  --line:         #e6dfd1;

  /* Typography */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                  Helvetica, Arial, sans-serif;

  /* Structure */
  --maxw:         1180px;
  --gutter:       clamp(1rem, 4vw, 2rem);
  --section-y:    clamp(3.5rem, 8vw, 7rem);
  --radius:       14px;
  --radius-sm:    9px;
  --radius-pill:  999px;

  /* Shadows */
  --shadow-card:        0 1px 2px rgba(20, 30, 25, .05), 0 10px 26px -14px rgba(20, 30, 25, .22);
  --shadow-card-hover:  0 20px 46px -20px rgba(20, 30, 25, .42);
  --cover-shadow:       drop-shadow(0 14px 22px rgba(20, 30, 25, .26));
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* keep anchored sections clear of the sticky header */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;          /* 17px */
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--green); text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 .6em;
}

p { margin: 0 0 1rem; }
ul { margin: 0; }

/* 3. ---- Layout primitives ---------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--tint   { background: var(--green-tint); }
.section--paper2 { background: var(--paper-2); }

.section__head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem;
  font-weight: 700;
  color: var(--green);
  margin: 0 0 .7rem;
}

.section__title {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin: 0 0 .6rem;
}

.section__lead {
  font-size: 1.12rem;
  color: var(--ink-2);
  margin: 0;
}
.section__head--center .section__lead { margin-inline: auto; }

/* 4. ---- Buttons -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: .9rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease,
              color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: .55rem 1.05rem; font-size: .9rem; }

.btn--solid   { background: var(--green); color: #fff; }
.btn--solid:hover { background: #1a5b43; color: #fff; }

.btn--cream   { background: var(--paper); color: var(--green-dk); }
.btn--cream:hover { background: #fff; color: var(--green-dk); }

.btn--ghost   { background: transparent; border-color: rgba(255, 255, 255, .55); color: #fbf7ef; }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fbf7ef; color: #fff; }

/* 5. ---- Accessibility helpers ----------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px; top: 0;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: .85rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

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

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

/* 6. ---- Header / navigation ------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 247, 241, .92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand__logo {
  height: 44px;
  width: auto;
  /* The logo is black line art; multiply lets a white PNG background drop
     into the cream header instead of showing as a white box. */
  mix-blend-mode: multiply;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.05;
  letter-spacing: .005em;
  max-width: 11ch;
}

.nav__menu ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: .25rem;
  margin: 0;
  padding: 0;
}
.nav__menu a {
  display: inline-block;
  padding: .55rem .85rem;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color .15s ease, background-color .15s ease;
}
.nav__menu a:hover { color: var(--green); background: rgba(31, 107, 79, .08); }

/* The call-to-action button keeps white text (a.btn beats the .nav__menu a rule). */
.nav__menu a.btn { margin-left: .5rem; color: #fff; background: var(--green); }
.nav__menu a.btn:hover { background: #1a5b43; color: #fff; }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav__toggle-bar {
  display: block;
  width: 22px; height: 2px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform .25s ease, opacity .2s ease;
}

/* 7. ---- Hero ----------------------------------------------------------- */
.hero {
  background: var(--green-dk);
  color: #f1ece1;
  padding-block: clamp(4.5rem, 11vw, 9rem);
}
.hero__inner { max-width: 60ch; }
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .82rem;
  font-weight: 700;
  color: #d8c489;
  margin: 0 0 1.2rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  line-height: 1.04;
  color: #fff;
  margin: 0 0 1.2rem;
  max-width: 16ch;
}
.hero__lead {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.6;
  color: #e6dfce;
  margin: 0 0 2.2rem;
  max-width: 52ch;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; }

/* 8. ---- About / services / genres / signature ------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.service {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-card);
}
.service__icon {
  width: 38px; height: 38px;
  color: var(--green);
  margin-bottom: .9rem;
}
.service__title { font-size: 1.18rem; margin: 0 0 .35rem; }
.service__text { color: var(--ink-2); font-size: .96rem; margin: 0; }

/* Genres — a clean two-column index, no tags or bullet dots. */
.genres { margin-top: clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.genre-list {
  list-style: none;
  padding: 0;
  margin: 1.1rem auto 0;
  max-width: 540px;
  columns: 2;
  column-gap: 3rem;
  text-align: left;
}
.genre-list li {
  padding: .6rem .1rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.04rem;
  break-inside: avoid;
}

/* Signature package — a quiet, editorial statement (no accent box). */
.signature {
  max-width: 680px;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  padding-top: clamp(2rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
  text-align: center;
}
.signature__text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-2);
  margin: .6rem 0 0;
}
.signature__text strong { color: var(--ink); font-weight: 600; }

/* 9. ---- Book cards + catalog grid (frameless, no-crop covers) ---------- */
.catalog {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.75rem, 3.5vw, 3rem) clamp(1.25rem, 2.5vw, 2rem);
}

.book { display: flex; }

.book__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

/* Covers stand on a shared baseline (like books on a shelf) and are sized with
   object-fit:contain, so the WHOLE cover always shows at its true aspect ratio:
   portrait stays tall, square stays square, nothing is cropped. The drop-shadow
   is on the <img>, so it hugs the cover. No card frame — covers sit on the
   section background, which keeps the grid airy instead of skinny. */
.book__media {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 300px;
  margin-bottom: 1.1rem;
}
.book__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: var(--cover-shadow);
  transition: transform .25s ease;
}
.book__link:hover .book__img,
.book__link:focus-visible .book__img { transform: translateY(-7px) scale(1.02); }

.book__title {
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 .5rem;
  transition: color .15s ease;
}
.book__link:hover .book__title { color: var(--green); }

.book__cta {
  margin-top: auto;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green);
}
.book__cta::after { content: " \2192"; } /* → */

/* 10. ---- Get-published section (business card) ------------------------ */
.publish {
  background: var(--green-dk);
  color: #f1ece1;
  text-align: center;
}
.publish .container { max-width: 820px; }
.publish h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 1rem; }
.publish p { color: #e3dccb; font-size: 1.12rem; margin: 0 auto 2.2rem; max-width: 56ch; }
.publish__card {
  max-width: 600px;
  margin: 0 auto 2.2rem;
  padding: clamp(12px, 2vw, 18px);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 26px 54px -26px rgba(0, 0, 0, .65);
}
.publish__card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 7px);
}

/* 11. ---- Footer + scroll-to-top -------------------------------------- */
.footer {
  background: var(--ink);
  color: #c5ccc6;
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.footer a { color: #d7ddd6; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.1fr;
  gap: 2.5rem;
}
.footer__brand-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
  margin: 0 0 .6rem;
}
.footer__blurb { color: #aab2ac; max-width: 38ch; margin: 0; font-size: .96rem; }

.footer__col h3 {
  color: #fff;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: .55rem; }

.footer__phone {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff !important;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-block: 1.5rem;
  text-align: center;
  font-size: .85rem;
  color: #99a19b;
}

.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 8px 20px -6px rgba(20, 30, 25, .5);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background-color .15s ease;
  z-index: 55;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: #1a5b43; }
.to-top svg { width: 20px; height: 20px; }

/* 12. ---- Responsive refinements -------------------------------------- */
/* 2 covers on phones, 3 on tablets, 4 on desktop — kept at 4 (not 5+) so
   covers stay substantial rather than skinny, while capped by the 1180px
   container so they never get oversized on wide monitors. */
@media (min-width: 600px) { .catalog { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .catalog { grid-template-columns: repeat(4, 1fr); } }

@media (max-width: 860px) {
  .nav__toggle { display: flex; }

  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 26px -18px rgba(20, 30, 25, .5);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav__menu.is-open { max-height: 70vh; }
  .nav__menu ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem var(--gutter) 1.1rem;
  }
  .nav__menu a { padding: .85rem .25rem; border-bottom: 1px solid var(--line); }
  .nav__menu a.btn { margin: .85rem 0 0; justify-content: center; }

  /* Animate the hamburger into a close (X) icon when open. */
  .nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(7px) 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(-7px) rotate(-45deg); }
}

@media (max-width: 620px) {
  .book__media { height: 250px; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 400px) {
  .book__media { height: 220px; }
}

@media (max-width: 480px) {
  .genre-list { columns: 1; max-width: 320px; }
}
