/* ============================================
   salanphelps.com — shared stylesheet
   Palette + type locked in from the design mockup.
   Change values here to update the whole site.
   ============================================ */

:root {
  /* backgrounds */
  --bg-page: #DCD3BE;        /* "dim the lights" cream */
  --bg-nav: #CFC4A9;
  --bg-footer: #1C1848;

  /* purple family (shoggoth body) */
  --purple-900: #26215C;
  --purple-800: #3C3489;
  --purple-600: #534AB7;
  --purple-400: #7F77DD;

  /* accents */
  --pink-600: #D4537E;
  --pink-900: #4B1528;
  --amber-500: #EF9F27;

  /* text + lines */
  --text-primary: #2C2C2A;
  --text-secondary: #4A463A;
  --text-muted: #837C63;
  --border: #C6BB9E;
  --placeholder-fill: #A8A084;

  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1100px;

  --font-heading: 'Fraunces', serif;
  --font-body: 'Karla', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--purple-900);
  margin: 0 0 0.5em;
  line-height: 1.2;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.2rem; }

a { color: var(--pink-600); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- header / nav ---------- */

.site-header {
  background: var(--bg-nav);
  border-bottom: 0.5px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.site-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.site-nav { display: flex; gap: 28px; }

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
}
.site-nav a:hover { color: var(--pink-600); text-decoration: none; }

/* ---------- buttons ---------- */

.btn-buy {
  display: inline-block;
  background: var(--pink-600);
  color: var(--pink-900);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 24px;
  border-radius: 24px;
  border: none;
}
.btn-buy:hover { background: #c04673; text-decoration: none; }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--purple-800);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 9px 22px;
  border-radius: 24px;
  border: 2px solid var(--purple-800);
}
.btn-secondary:hover { text-decoration: none; background: rgba(60,52,137,0.08); }

/* ---------- hero (home page) ---------- */

.hero {
  position: relative;
  padding: 56px 0 60px;
}

.hero .wrap {
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-text { flex: 1; min-width: 0; }

.hero-cover {
  flex: 0 0 240px;
  height: 320px;
  background: var(--purple-900);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--border);
  position: relative;
  overflow: hidden;
}

.hero-cover .placeholder-label {
  position: absolute;
  inset: 16px;
  border: 1px dashed var(--purple-400);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-400);
  font-size: 0.8rem;
  text-align: center;
  padding: 8px;
}

.hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* the real peeking-shoggoth image (replaces the old placeholder blob) */
.peek-corner {
  position: absolute;
  width: 150px;
  right: -30px;
  bottom: -34px;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(28, 24, 72, 0.25));
}
.peek-corner img { width: 100%; display: block; }

/* the hand-lettered title treatment, used in place of plain text headings
   on Home and the book detail page. Always paired with real alt text. */
.title-logo {
  max-width: 420px;
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 0.3em;
}

/* small decorative tentacle vignettes — sprinkle sparingly */
.tentacle-accent {
  width: 90px;
  flex: none;
}
.tentacle-accent img { width: 100%; display: block; }

.hook-line {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 22px;
  max-width: 480px;
}

/* ---------- generic sections ---------- */

.section {
  padding: 40px 0;
}
.section.alt { background: var(--bg-nav); }

.section-label {
  color: var(--pink-900);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

/* ---------- look inside strip ---------- */

.look-inside-strip {
  display: flex;
  gap: 14px;
}
.look-inside-strip .spread {
  flex: 1;
  height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
}
.look-inside-strip .spread img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- book / collaborator cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.book-card, .collab-card {
  background: #E9E1CC;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.book-card .cover-thumb {
  width: 100%;
  height: 180px;
  background: var(--purple-900);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.collab-card .avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--placeholder-fill);
  margin-bottom: 12px;
}

.placeholder-note {
  display: inline-block;
  background: #EEE7D4;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 4px;
  margin-top: 6px;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--bg-footer);
  color: var(--purple-400);
  padding: 28px 0;
  margin-top: 40px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}

.site-footer a { color: var(--purple-400); }
.site-footer a:hover { color: #fff; }

.imprint-credit { color: #A199D8; }

/* ============================================
   RESPONSIVE — mobile & tablet
   Everything above is the desktop/default layout.
   These rules only kick in on smaller screens.
   ============================================ */

@media (max-width: 780px) {

  .wrap { padding: 0 20px; }

  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.4rem; }

  /* nav: stack under the title instead of squeezing sideways */
  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .site-nav { gap: 18px; flex-wrap: wrap; }

  /* hero: stack text above cover art, shrink the cover */
  .hero { padding: 36px 0 44px; }
  .hero .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .hero-cover {
    flex: none;
    width: 100%;
    max-width: 280px;
    height: 240px;
  }

  /* shrink + reposition the peeking creature so it doesn't overflow
     the narrower cover box on small screens */
  .peek-corner {
    width: 100px;
    right: -14px;
    bottom: -20px;
  }

  /* book-detail page reuses .hero-cover in a flex row — stack it too */
  .section .wrap[style*="flex"] {
    flex-direction: column !important;
  }

  /* look inside strip: 3 across is too tight on a phone */
  .look-inside-strip { flex-direction: column; }
  .look-inside-strip .spread { height: 100px; }

  .card-grid { grid-template-columns: 1fr; }

  .title-logo { max-width: 280px; }
  .tentacle-accent { display: none; }

  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}
