/* ================================================================
   Gradient Books — v2
   Design language: Carrd-inspired editorial/gallery aesthetic.
   Image-forward, generous whitespace, Raleway + Source Sans Pro.
   ================================================================ */

:root {
  --bg: #F2F2F2;
  --card-bg: #FFFFFF;
  --fg: #474747;
  --fg-light: #777;
  --muted: #B3B3B3;
  --border: #E0E0E0;
  --accent: #1CCBD6;
  --max-width: 74rem;
  --section-pad-v: 5rem;
  --section-pad-h: 4rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 18px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300;
  line-height: 1.875;
}

a { color: inherit; text-decoration: underline; transition: color 0.25s ease; }
a:hover { color: var(--accent); }

h1, h2, h3 {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}
h1 { font-size: 1.875em; letter-spacing: 0.3em; }
h2 { font-size: 1.25em; letter-spacing: 0.28em; }
h3 { font-size: 1em;    letter-spacing: 0.2em; }

p { margin-bottom: 1rem; }

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

/* ── CTA button ── */
.cta {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  text-decoration: none;
  text-transform: uppercase;
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 0.625em;
  letter-spacing: 0.25em;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.cta:hover { border-color: var(--accent); color: var(--accent); }

/* ================================================================
   SITE HEADER — compact top bar
   ================================================================ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-mark {
  width: 2rem; height: auto;
  border-radius: 0.15rem;
}
.brand-name {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
}
.site-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none;
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.625rem;
  letter-spacing: 0.25em;
  transition: color 0.25s ease;
}
.site-nav a:hover { color: var(--accent); }

/* ================================================================
   HERO SPLIT — full-viewport two-column landing
   ================================================================ */
.hero-split {
  display: flex;
  min-height: calc(100vh - 4rem);
  background: var(--card-bg);
}
.hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--section-pad-v) var(--section-pad-h);
  max-width: 50%;
}
.hero-logo {
  width: clamp(12rem, 30vw, 22rem);
  margin-bottom: 2rem;
}
.hero-title {
  font-size: 1.875em;
  letter-spacing: 0.5em;
  margin-bottom: 0.4rem;
}
.hero-tagline {
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.45em;
  font-size: 0.7em;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 2.5rem;
}
.hero-desc {
  max-width: 32rem;
  margin-bottom: 2rem;
}
.hero-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-image {
  flex: 1;
  max-width: 50%;
  overflow: hidden;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================================================================
   SPLIT SECTIONS — alternating image/text panels
   ================================================================ */
.split-section {
  display: flex;
  min-height: 38rem;
  background: var(--card-bg);
}
.split-section + .split-section,
.hero-split + .split-section { margin-top: 0; }

.split-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--section-pad-v) var(--section-pad-h);
  max-width: 50%;
}
.split-image {
  flex: 1;
  max-width: 50%;
  overflow: hidden;
}
.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Cover-art variant: don't fill full panel, center the book cover */
.split-image--cover {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 3rem;
}
.split-image--cover img {
  width: auto;
  /* Keep sharp: cap at native px so low-res covers aren't stretched */
  max-width: min(16rem, 100%);
  height: auto;
  max-height: 28rem;
  object-fit: contain;
  border-radius: 0.25rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  image-rendering: auto;
}

/* Reverse order (image right, text left) */
.split-section--reverse { flex-direction: row-reverse; }

.section-tagline {
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.45em;
  font-size: 0.7em;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

.title-list {
  list-style: none;
  margin: 0.75rem 0 1.5rem;
}
.title-list li { margin-bottom: 0.35rem; }
.title-list a { text-decoration: none; font-weight: 400; }
.title-list a:hover { color: var(--accent); text-decoration: underline; }
.title-list .by { color: var(--muted); font-size: 0.9em; }

/* ================================================================
   SERIES INDEX PAGES
   ================================================================ */
.series-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--section-pad-h) 1.5rem;
}
.eyebrow {
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.625em;
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.eyebrow a { text-decoration: none; }
.series-desc { max-width: 48rem; }
.series-empty { color: var(--muted); font-style: italic; }

.book-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem var(--section-pad-h) 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.75rem;
}
.book-card {
  display: block;
  background: var(--card-bg);
  border-radius: 0.35rem;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.book-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.book-card-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}
.book-card-cover--placeholder {
  background: linear-gradient(135deg, #e8e8e8, #f5f5f5);
}
.book-card-meta { padding: 1rem 1.15rem; }
.book-card-meta h3 {
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
}
.book-card-author { color: var(--muted); font-size: 0.85rem; margin: 0.15rem 0 0.25rem; }
.badge {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0.2rem;
  padding: 0.1rem 0.45rem;
}

/* ================================================================
   BOOK DETAIL PAGES
   ================================================================ */
.book-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem var(--section-pad-h) 4rem;
}
.book-hero {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 3rem;
}
.book-hero-cover {
  width: auto;
  max-width: min(18rem, 100%);
  height: auto;
  border-radius: 0.35rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  /* Never upscale beyond native resolution */
  image-rendering: auto;
}
.book-hero-meta { flex: 1; min-width: 16rem; }
.book-subtitle {
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.75em;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.75rem;
}
.book-author { font-weight: 400; margin-bottom: 0.25rem; }
.book-original { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.75rem; }

.book-body { max-width: 42rem; }
.book-body h2 {
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.15rem;
  margin-top: 2.5rem;
}
.book-body blockquote {
  border-left: 3px solid var(--border);
  margin: 0 0 1.5rem;
  padding: 0.5rem 0 0.5rem 1.5rem;
  color: var(--fg);
  font-style: italic;
}

/* ================================================================
   STATIC / ABOUT / CONTACT PAGES
   ================================================================ */
.static-page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem var(--section-pad-h) 4rem;
}
.static-page h1 { margin-bottom: 2rem; }
.contact-block {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 28rem;
}
.contact-form label {
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  font-size: 0.625em;
  letter-spacing: 0.2em;
  margin-top: 0.75rem;
  font-weight: 700;
}
.contact-form input,
.contact-form textarea {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  background: transparent;
  color: var(--fg);
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); outline: none; }
.contact-form button {
  margin-top: 1rem;
  align-self: flex-start;
}
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}
.contact-placeholder { color: var(--muted); font-style: italic; }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem var(--section-pad-h);
  text-align: right;
  color: var(--muted);
  font-size: 0.8rem;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ================================================================
   RESPONSIVE — TABLET
   ================================================================ */
@media (max-width: 52rem) {
  :root {
    --section-pad-h: 2rem;
    --section-pad-v: 3rem;
  }
  html { font-size: 16px; }

  .hero-split,
  .split-section,
  .split-section--reverse {
    flex-direction: column;
    min-height: auto;
  }
  .hero-text, .hero-image,
  .split-text, .split-image {
    max-width: 100%;
  }
  .hero-image {
    min-height: 20rem;
    max-height: 28rem;
    order: -1; /* image on top on mobile */
  }
  .split-image {
    min-height: 16rem;
    max-height: 24rem;
  }
  .hero-title { letter-spacing: 0.3em; font-size: 1.5em; }
  .hero-tagline { letter-spacing: 0.25em; }
  .book-hero { flex-direction: column; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
}

/* ================================================================
   RESPONSIVE — PHONE
   ================================================================ */
@media (max-width: 30rem) {
  :root {
    --section-pad-h: 1.25rem;
    --section-pad-v: 2rem;
  }
  html { font-size: 15px; }

  .site-header { padding: 1rem 1.25rem; }
  .brand-name { font-size: 0.7rem; letter-spacing: 0.15em; }
  .site-nav { gap: 0.75rem; }
  .site-nav a { font-size: 0.55rem; }

  h1 { font-size: 1.4em; letter-spacing: 0.2em; }
  h2 { font-size: 1.1em; letter-spacing: 0.18em; }
  .hero-title { font-size: 1.3em; letter-spacing: 0.25em; }
  .hero-tagline { font-size: 0.6em; letter-spacing: 0.2em; margin-bottom: 1.5rem; }
  .hero-logo { width: clamp(8rem, 60vw, 14rem); margin-bottom: 1.25rem; }
  .hero-nav { gap: 0.5rem; }
  .hero-nav .cta { font-size: 0.55em; padding: 0.5rem 1rem; }

  .split-text { padding: var(--section-pad-v) var(--section-pad-h); }
  .section-tagline { font-size: 0.6em; letter-spacing: 0.3em; }

  .book-hero-cover { max-width: 10rem; }
  .book-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .site-footer { text-align: center; }
}
