/* ==========================================
   HANSCOMBE BOOKS — Main Stylesheet
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  /* Colors — drawn from the Hanscombe Books logo (midnight navy + gold) */
  --bg:            #0e1a2b;
  --bg-secondary:  #122238;
  --bg-elevated:   #17293f;
  --bg-card:       #142943;
  --accent-gold:      #d8b25c;
  --accent-gold-hover:#e8c877;
  --accent-cream:  #f4efe3;
  --text:          #f2eee4;
  --text-muted:    #b9c2cf;
  --text-dim:      #7c8ba0;
  --border:        #26374d;
  --border-subtle: #1c2c42;
  --success:       #6fae7c;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, -apple-system, sans-serif;

  --section-pad:   clamp(3.5rem, 7vw, 6.5rem);
  --container-max: 1180px;
  --nav-height:    76px;

  --t: 0.2s ease;
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-gold); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent-gold-hover); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}
.section { padding: var(--section-pad) 0; }
.section--alt { background-color: var(--bg-secondary); }
.section--elevated { background-color: var(--bg-elevated); }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h4 { font-size: clamp(1rem, 1.8vw, 1.15rem); }

p { color: var(--text-muted); max-width: 68ch; }
p.lede { font-size: 1.15rem; color: var(--text); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  display: block;
  margin-bottom: 0.9rem;
}
.section-title { margin-bottom: 0.9rem; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 2.5rem; max-width: 62ch; }

.divider {
  width: 52px;
  height: 3px;
  background: var(--accent-gold);
  margin: 1.25rem 0;
  border-radius: 2px;
}
.divider--center { margin-left: auto; margin-right: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.9rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 4px;
  border: none;
  text-decoration: none;
  transition: all var(--t);
  white-space: nowrap;
  line-height: 1;
}
.btn-primary { background-color: var(--accent-gold); color: #1a1204 !important; }
.btn-primary:hover { background-color: var(--accent-gold-hover); transform: translateY(-2px); color: #1a1204 !important; }
.btn-secondary { background-color: transparent; color: var(--accent-gold) !important; border: 1px solid var(--accent-gold); }
.btn-secondary:hover { background-color: rgba(216,178,92,0.1); transform: translateY(-2px); }
.btn-ghost { background-color: transparent; color: var(--text-muted) !important; border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text) !important; }
.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.82rem; }
.btn-group { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background-color: rgba(14, 26, 43, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), background-color var(--t);
}
.nav.scrolled { border-bottom-color: var(--border-subtle); background-color: rgba(14, 26, 43, 0.99); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  gap: 1.5rem;
}
.nav__logo { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.nav__logo img { height: 44px; width: auto; }
.nav__logo-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text) !important;
  letter-spacing: 0.01em;
}
.nav__links { display: flex; align-items: center; gap: 1.6rem; flex: 1; justify-content: center; }
.nav__links a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}
.nav__links a:hover, .nav__links a.active { color: var(--accent-gold); }
.nav__cta {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.6rem 1.3rem;
  background-color: var(--accent-gold);
  color: #1a1204 !important;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background-color var(--t);
}
.nav__cta:hover { background-color: var(--accent-gold-hover); }
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav__hamburger span { display: block; width: 24px; height: 2px; background-color: var(--text); transition: all 0.25s ease; }
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none;
  flex-direction: column;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background-color: rgba(14, 26, 43, 0.99);
  padding: 1.75rem clamp(1.25rem, 5vw, 3rem) 2.25rem;
  border-bottom: 1px solid var(--border);
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  z-index: 99;
}
.nav__mobile.open { transform: translateY(0); opacity: 1; pointer-events: all; }
.nav__mobile-links { display: flex; flex-direction: column; gap: 1.1rem; margin-bottom: 1.75rem; }
.nav__mobile-links a { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); }
.nav__mobile-links a:hover { color: var(--accent-gold); }

/* ---- Hero (home) ---- */
.hero {
  position: relative;
  padding: calc(var(--nav-height) + 3.5rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(216,178,92,0.14), transparent),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-secondary) 100%);
  border-bottom: 1px solid var(--border-subtle);
}
.hero__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__eyebrow { margin-bottom: 1.1rem; }
.hero__title { margin-bottom: 1.1rem; }
.hero__tagline { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-muted); max-width: 46ch; margin-bottom: 2rem; line-height: 1.8; }
.hero__logo-mark { display: flex; justify-content: center; }
.hero__logo-mark img { width: min(340px, 85%); }

/* ---- Trust strip ---- */
.trust-strip {
  background-color: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
}
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.trust-item {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.trust-item strong { color: var(--text); font-weight: 600; }

/* ---- Book grid ---- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.25rem);
}
.book-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card, var(--bg-elevated));
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform var(--t), border-color var(--t);
}
.book-card:hover { transform: translateY(-6px); border-color: var(--accent-gold); }
.book-card__cover { aspect-ratio: 2/3; overflow: hidden; background-color: var(--bg-elevated); }
.book-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card__body { padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; flex: 1; gap: 0.6rem; }
.book-card__title { font-size: 1.05rem; }
.book-card__blurb { font-size: 0.88rem; color: var(--text-muted); flex: 1; }
.book-card__price { font-size: 0.85rem; color: var(--accent-gold); font-weight: 600; }
.book-card__cta { margin-top: 0.5rem; }

/* ---- Featured book spotlight ---- */
.book-feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.book-feature__cover { width: clamp(160px, 18vw, 240px); flex-shrink: 0; }
.book-feature__cover img { width: 100%; border-radius: 6px; box-shadow: 0 25px 55px rgba(0,0,0,0.5), 0 0 0 1px var(--border); }
.book-feature__info p { margin-bottom: 1.25rem; }

/* ---- Book detail page ---- */
.book-hero { display: grid; grid-template-columns: auto 1fr; gap: clamp(2.25rem, 5vw, 4.5rem); align-items: start; }
.book-hero__cover { width: clamp(200px, 22vw, 300px); flex-shrink: 0; position: sticky; top: calc(var(--nav-height) + 2rem); }
.book-hero__cover img { width: 100%; border-radius: 6px; box-shadow: 0 30px 70px rgba(0,0,0,0.55), 0 0 0 1px var(--border); }
.book-hero__meta { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.book-hero__price-row {
  display: flex; flex-wrap: wrap; gap: 1.75rem;
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.price-block__label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.25rem; }
.price-block__value { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent-gold); font-weight: 600; }
.synopsis p { max-width: none; font-size: 1.02rem; }
.synopsis p + p { margin-top: 1.1rem; }
.synopsis ul { margin: 1rem 0 1rem 0; }
.synopsis ul li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
}
.synopsis ul li::before {
  content: '✓';
  position: absolute; left: 0; top: 0;
  color: var(--accent-gold);
  font-weight: 700;
}

.excerpt-block {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-gold);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: 8px;
}
.excerpt-block__label { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-gold); margin-bottom: 1.25rem; font-weight: 700; }
.excerpt-block__text { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.9; color: var(--text); font-style: italic; max-width: 70ch; }
.excerpt-block__text p + p { margin-top: 1.1rem; }
.excerpt-block__fade {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---- Content warning / notice box ---- */
.notice-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.4rem;
  background-color: var(--bg-card, var(--bg-elevated));
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.notice-box__icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }
.notice-box p { font-size: 0.9rem; max-width: none; }

/* ---- Steps ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.step {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 1.75rem;
}
.step__num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
  font-weight: 700;
}
.step h3 { margin-bottom: 0.6rem; font-size: 1.1rem; }
.step p { font-size: 0.92rem; max-width: none; }

/* ---- Tool cards (Writer Tools page) ---- */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.tool-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.tool-card__icon {
  width: 48px; height: 48px;
  border-radius: 8px;
  background-color: rgba(216,178,92,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.tool-card h3 { font-size: 1.1rem; }
.tool-card p { font-size: 0.92rem; flex: 1; max-width: none; }

/* ---- Team photos (About page) ---- */
.tool-card__photo {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-gold);
}

/* ---- Email capture ---- */
.email-capture {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(2.25rem, 5vw, 3.75rem) clamp(1.5rem, 5vw, 3.5rem);
  text-align: center;
}
.email-capture__title { margin-bottom: 0.75rem; }
.email-capture__sub { color: var(--text-muted); margin: 0 auto 1.75rem; }
.email-form { display: flex; max-width: 460px; margin: 0 auto; gap: 0; }
.email-form input[type="email"] {
  flex: 1;
  padding: 0.85rem 1.15rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 6px 0 0 6px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  min-width: 0;
  transition: border-color var(--t);
}
.email-form input[type="email"]::placeholder { color: var(--text-dim); }
.email-form input[type="email"]:focus { border-color: var(--accent-gold); }
.email-form button {
  padding: 0.85rem 1.5rem;
  background-color: var(--accent-gold);
  color: #1a1204;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--accent-gold);
  border-radius: 0 6px 6px 0;
  white-space: nowrap;
  transition: background-color var(--t);
}
.email-form button:hover { background-color: var(--accent-gold-hover); }
.email-form__note { font-size: 0.78rem; color: var(--text-dim); margin-top: 1rem; max-width: none; }

/* ---- Page hero (inner pages) ---- */
.page-hero {
  padding: calc(var(--nav-height) + clamp(2.5rem, 6vw, 4.5rem)) 0 clamp(2.5rem, 5vw, 4rem);
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.page-hero__title { margin-bottom: 0.9rem; }
.page-hero__sub { font-size: 1.05rem; color: var(--text-muted); max-width: 60ch; }

/* ---- FAQ ---- */
.faq-item { border-bottom: 1px solid var(--border-subtle); padding: 1.5rem 0; }
.faq-item h3 { font-size: 1.05rem; margin-bottom: 0.6rem; color: var(--accent-gold); }
.faq-item p { max-width: none; }

/* ---- Two-col ---- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }

/* ---- Footer ---- */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 3rem);
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}
.footer__brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.footer__brand img { height: 40px; width: auto; }
.footer__brand-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--text); }
.footer__tagline { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.5rem; max-width: 30ch; }
.footer__col-title { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-gold); margin-bottom: 1.1rem; font-weight: 700; }
.footer__links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer__links a { font-size: 0.9rem; color: var(--text-muted); }
.footer__links a:hover { color: var(--text); }
.footer__bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer__copy { font-size: 0.8rem; color: var(--text-dim); max-width: none; }
.footer__bottom-links { display: flex; gap: 1.5rem; }
.footer__bottom-links a { font-size: 0.8rem; color: var(--text-dim); }
.footer__bottom-links a:hover { color: var(--text-muted); }

/* ---- Utilities ---- */
.text-center { text-align: center; }
.text-gold { color: var(--accent-gold) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-dim { color: var(--text-dim) !important; }
.mt-2 { margin-top: 1rem; } .mt-4 { margin-top: 2rem; } .mt-6 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 2rem; } .mb-6 { margin-bottom: 3rem; }
.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;
}

/* ---- Coming soon / stub ---- */
.coming-soon { min-height: 40vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 3rem 2rem; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__logo-mark { order: -1; }
  .hero__logo-mark img { width: 200px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
  .nav__mobile { display: flex; }
  .book-hero { grid-template-columns: 1fr; }
  .book-hero__cover { width: 220px; position: static; }
}

@media (max-width: 768px) {
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .book-feature { grid-template-columns: 1fr; }
  .book-feature__cover { width: 180px; }
  .tool-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .email-form { flex-direction: column; }
  .email-form input[type="email"] { border-right: 1px solid var(--border); border-bottom: none; border-radius: 6px 6px 0 0; }
  .email-form button { border-radius: 0 0 6px 6px; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .trust-inner { gap: 0.9rem 1.5rem; }
}

@media (max-width: 480px) {
  .book-grid { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; width: 100%; }
  .btn-group .btn { width: 100%; text-align: center; }
}
